@wirekyt/solid 0.0.1 → 0.0.2

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 (207) hide show
  1. package/dist/accordion.d.ts +68 -0
  2. package/dist/accordion.js +168 -0
  3. package/dist/accordion.jsx +143 -0
  4. package/dist/angle-slider.d.ts +72 -0
  5. package/dist/angle-slider.js +141 -0
  6. package/dist/angle-slider.jsx +130 -0
  7. package/dist/avatar.d.ts +47 -0
  8. package/dist/avatar.js +86 -0
  9. package/dist/avatar.jsx +79 -0
  10. package/dist/carousel.d.ts +92 -0
  11. package/dist/carousel.js +189 -0
  12. package/dist/carousel.jsx +174 -0
  13. package/dist/checkbox.d.ts +140 -0
  14. package/dist/checkbox.js +252 -0
  15. package/dist/checkbox.jsx +234 -0
  16. package/dist/client-only.d.ts +9 -0
  17. package/dist/client-only.js +22 -0
  18. package/dist/client-only.jsx +13 -0
  19. package/dist/clipboard.d.ts +70 -0
  20. package/dist/clipboard.js +137 -0
  21. package/dist/clipboard.jsx +120 -0
  22. package/dist/collapsible-BwNoH1At.jsx +106 -0
  23. package/dist/collapsible-Dp8aqjtN.js +118 -0
  24. package/dist/collapsible.d.ts +58 -0
  25. package/dist/collapsible.js +2 -0
  26. package/dist/collapsible.jsx +2 -0
  27. package/dist/collection-By8qgqkx.js +213 -0
  28. package/dist/collection-Mkvw6TyT.jsx +213 -0
  29. package/dist/collection.d.ts +2 -0
  30. package/dist/collection.js +2 -0
  31. package/dist/collection.jsx +2 -0
  32. package/dist/color-picker.d.ts +179 -0
  33. package/dist/color-picker.js +457 -0
  34. package/dist/color-picker.jsx +395 -0
  35. package/dist/combobox.d.ts +128 -0
  36. package/dist/combobox.js +326 -0
  37. package/dist/combobox.jsx +284 -0
  38. package/dist/core-7QKBNp9p.js +485 -0
  39. package/dist/core-7QKBNp9p.jsx +485 -0
  40. package/dist/date-input.d.ts +68 -0
  41. package/dist/date-input.js +178 -0
  42. package/dist/date-input.jsx +163 -0
  43. package/dist/date-picker.d.ts +191 -0
  44. package/dist/date-picker.js +506 -0
  45. package/dist/date-picker.jsx +430 -0
  46. package/dist/dialog.d.ts +77 -0
  47. package/dist/dialog.js +205 -0
  48. package/dist/dialog.jsx +159 -0
  49. package/dist/download-trigger.d.ts +22 -0
  50. package/dist/download-trigger.js +55 -0
  51. package/dist/download-trigger.jsx +51 -0
  52. package/dist/drawer.d.ts +114 -0
  53. package/dist/drawer.js +291 -0
  54. package/dist/drawer.jsx +237 -0
  55. package/dist/editable.d.ts +77 -0
  56. package/dist/editable.js +171 -0
  57. package/dist/editable.jsx +162 -0
  58. package/dist/factory-D2A7xdtl.js +34 -0
  59. package/dist/factory-DRw_slzE.jsx +34 -0
  60. package/dist/factory-wuwfJqbU.d.ts +15 -0
  61. package/dist/field-CQr_Dibp.js +317 -0
  62. package/dist/field-R5jVNdtK.jsx +282 -0
  63. package/dist/field.d.ts +194 -0
  64. package/dist/field.js +2 -0
  65. package/dist/field.jsx +2 -0
  66. package/dist/fieldset-5shfE0Z5.jsx +155 -0
  67. package/dist/fieldset-D5teGLZ9.js +170 -0
  68. package/dist/fieldset.d.ts +98 -0
  69. package/dist/fieldset.js +2 -0
  70. package/dist/fieldset.jsx +2 -0
  71. package/dist/file-upload.d.ts +100 -0
  72. package/dist/file-upload.js +254 -0
  73. package/dist/file-upload.jsx +232 -0
  74. package/dist/floating-panel.d.ts +97 -0
  75. package/dist/floating-panel.js +231 -0
  76. package/dist/floating-panel.jsx +199 -0
  77. package/dist/focus-trap.d.ts +12 -0
  78. package/dist/focus-trap.js +30 -0
  79. package/dist/focus-trap.jsx +26 -0
  80. package/dist/format.d.ts +32 -0
  81. package/dist/format.js +50 -0
  82. package/dist/format.jsx +53 -0
  83. package/dist/frame.d.ts +12 -0
  84. package/dist/frame.js +119 -0
  85. package/dist/frame.jsx +83 -0
  86. package/dist/image-cropper.d.ts +62 -0
  87. package/dist/image-cropper.js +137 -0
  88. package/dist/image-cropper.jsx +130 -0
  89. package/dist/index-B17eqq14.d.ts +32 -0
  90. package/dist/index-BZHmHI7d.d.ts +142 -0
  91. package/dist/index-CANuc1X0.d.ts +81 -0
  92. package/dist/index-CJwZCGOS.d.ts +75 -0
  93. package/dist/index-ClU-Lb8Z.d.ts +23 -0
  94. package/dist/index-J9N2CBHP.d.ts +21 -0
  95. package/dist/index.d.ts +5 -0
  96. package/dist/index.js +5 -0
  97. package/dist/index.jsx +5 -0
  98. package/dist/json-tree-view.d.ts +50 -0
  99. package/dist/json-tree-view.js +330 -0
  100. package/dist/json-tree-view.jsx +201 -0
  101. package/dist/listbox.d.ts +109 -0
  102. package/dist/listbox.js +237 -0
  103. package/dist/listbox.jsx +212 -0
  104. package/dist/marquee.d.ts +57 -0
  105. package/dist/marquee.js +125 -0
  106. package/dist/marquee.jsx +113 -0
  107. package/dist/menu.d.ts +158 -0
  108. package/dist/menu.js +441 -0
  109. package/dist/menu.jsx +362 -0
  110. package/dist/navigation-menu.d.ts +88 -0
  111. package/dist/navigation-menu.js +289 -0
  112. package/dist/navigation-menu.jsx +228 -0
  113. package/dist/number-input.d.ts +72 -0
  114. package/dist/number-input.js +166 -0
  115. package/dist/number-input.jsx +157 -0
  116. package/dist/pagination.d.ts +67 -0
  117. package/dist/pagination.js +131 -0
  118. package/dist/pagination.jsx +124 -0
  119. package/dist/password-input.d.ts +64 -0
  120. package/dist/password-input.js +144 -0
  121. package/dist/password-input.jsx +125 -0
  122. package/dist/pin-input.d.ts +57 -0
  123. package/dist/pin-input.js +138 -0
  124. package/dist/pin-input.jsx +129 -0
  125. package/dist/popover.d.ts +92 -0
  126. package/dist/popover.js +206 -0
  127. package/dist/popover.jsx +174 -0
  128. package/dist/presence-9UGkuyfn.jsx +59 -0
  129. package/dist/presence-CE6lXCu5.js +72 -0
  130. package/dist/presence.d.ts +2 -0
  131. package/dist/presence.js +2 -0
  132. package/dist/presence.jsx +2 -0
  133. package/dist/progress.d.ts +77 -0
  134. package/dist/progress.js +146 -0
  135. package/dist/progress.jsx +137 -0
  136. package/dist/providers-B-Vi5wQ7.js +124 -0
  137. package/dist/providers-CqNHqLpB.jsx +110 -0
  138. package/dist/qr-code.d.ts +57 -0
  139. package/dist/qr-code.js +111 -0
  140. package/dist/qr-code.jsx +104 -0
  141. package/dist/radio-group.d.ts +77 -0
  142. package/dist/radio-group.js +170 -0
  143. package/dist/radio-group.jsx +157 -0
  144. package/dist/rating-group.d.ts +67 -0
  145. package/dist/rating-group.js +142 -0
  146. package/dist/rating-group.jsx +131 -0
  147. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  148. package/dist/rolldown-runtime-D7D4PA-g.jsx +13 -0
  149. package/dist/run-if-fn-CjvD7VzQ.js +5 -0
  150. package/dist/run-if-fn-CjvD7VzQ.jsx +5 -0
  151. package/dist/scroll-area.d.ts +61 -0
  152. package/dist/scroll-area.js +119 -0
  153. package/dist/scroll-area.jsx +109 -0
  154. package/dist/segment-group.d.ts +80 -0
  155. package/dist/segment-group.js +166 -0
  156. package/dist/segment-group.jsx +153 -0
  157. package/dist/select.d.ts +132 -0
  158. package/dist/select.js +337 -0
  159. package/dist/select.jsx +283 -0
  160. package/dist/signature-pad.d.ts +67 -0
  161. package/dist/signature-pad.js +159 -0
  162. package/dist/signature-pad.jsx +141 -0
  163. package/dist/slider.d.ts +87 -0
  164. package/dist/slider.js +191 -0
  165. package/dist/slider.jsx +179 -0
  166. package/dist/splitter.d.ts +57 -0
  167. package/dist/splitter.js +126 -0
  168. package/dist/splitter.jsx +116 -0
  169. package/dist/steps.d.ts +100 -0
  170. package/dist/steps.js +199 -0
  171. package/dist/steps.jsx +184 -0
  172. package/dist/swap.d.ts +51 -0
  173. package/dist/swap.js +123 -0
  174. package/dist/swap.jsx +106 -0
  175. package/dist/switch.d.ts +57 -0
  176. package/dist/switch.js +125 -0
  177. package/dist/switch.jsx +116 -0
  178. package/dist/tabs.d.ts +58 -0
  179. package/dist/tabs.js +146 -0
  180. package/dist/tabs.jsx +122 -0
  181. package/dist/tags-input.d.ts +97 -0
  182. package/dist/tags-input.js +228 -0
  183. package/dist/tags-input.jsx +213 -0
  184. package/dist/timer.d.ts +62 -0
  185. package/dist/timer.js +119 -0
  186. package/dist/timer.jsx +110 -0
  187. package/dist/toast.d.ts +60 -0
  188. package/dist/toast.js +120 -0
  189. package/dist/toast.jsx +106 -0
  190. package/dist/toggle-group.d.ts +42 -0
  191. package/dist/toggle-group.js +87 -0
  192. package/dist/toggle-group.jsx +80 -0
  193. package/dist/toggle.d.ts +38 -0
  194. package/dist/toggle.js +73 -0
  195. package/dist/toggle.jsx +61 -0
  196. package/dist/tooltip.d.ts +67 -0
  197. package/dist/tooltip.js +159 -0
  198. package/dist/tooltip.jsx +127 -0
  199. package/dist/tour.d.ts +112 -0
  200. package/dist/tour.js +256 -0
  201. package/dist/tour.jsx +192 -0
  202. package/dist/tree-view-ATyeBPXq.js +290 -0
  203. package/dist/tree-view-CoWx7osT.jsx +265 -0
  204. package/dist/tree-view.d.ts +3 -0
  205. package/dist/tree-view.js +3 -0
  206. package/dist/tree-view.jsx +3 -0
  207. package/package.json +324 -6
@@ -0,0 +1,67 @@
1
+ import { a as Optional, r as MaybeAccessor, s as PropTypes } from "./index-ClU-Lb8Z.js";
2
+ import { r as PolymorphicProps, t as HTMLProps } from "./factory-wuwfJqbU.js";
3
+ import { Accessor, JSX } from "solid-js";
4
+ import * as ratingGroup from "@wirekyt/dom/machines/rating-group";
5
+ import { HoverChangeDetails, HoverChangeDetails as RatingGroupHoverChangeDetails, ItemProps, ItemState, ValueChangeDetails, ValueChangeDetails as RatingGroupValueChangeDetails, anatomy as ratingGroupAnatomy } from "@wirekyt/dom/machines/rating-group";
6
+ //#region src/components/rating-group/use.d.ts
7
+ interface UseRatingGroupProps extends Optional<Omit<ratingGroup.Props, "dir" | "getRootNode">, "id"> {}
8
+ interface UseRatingGroupReturn extends Accessor<ratingGroup.Api<PropTypes>> {}
9
+ declare const useRatingGroup: (props?: MaybeAccessor<UseRatingGroupProps>) => UseRatingGroupReturn;
10
+ //#endregion
11
+ //#region src/components/rating-group/use-context.d.ts
12
+ interface UseRatingGroupContext extends UseRatingGroupReturn {}
13
+ declare const RatingGroupProvider: import("solid-js").ContextProviderComponent<UseRatingGroupContext>, useRatingGroupContext: () => UseRatingGroupContext;
14
+ //#endregion
15
+ //#region src/components/rating-group/context.d.ts
16
+ interface RatingGroupContextProps {
17
+ children: (context: UseRatingGroupContext) => JSX.Element;
18
+ }
19
+ declare const RatingGroupContext: (props: RatingGroupContextProps) => JSX.Element;
20
+ //#endregion
21
+ //#region src/components/rating-group/control.d.ts
22
+ interface RatingGroupControlBaseProps extends PolymorphicProps<"div"> {}
23
+ interface RatingGroupControlProps extends HTMLProps<"div">, RatingGroupControlBaseProps {}
24
+ declare const RatingGroupControl: (props: RatingGroupControlProps) => import("solid-js").JSX.Element;
25
+ //#endregion
26
+ //#region src/components/rating-group/hidden-input.d.ts
27
+ interface RatingGroupHiddenInputBaseProps extends PolymorphicProps<"input"> {}
28
+ interface RatingGroupHiddenInputProps extends HTMLProps<"input">, RatingGroupHiddenInputBaseProps {}
29
+ declare const RatingGroupHiddenInput: (props: RatingGroupHiddenInputProps) => import("solid-js").JSX.Element;
30
+ //#endregion
31
+ //#region src/components/rating-group/item.d.ts
32
+ interface RatingGroupItemBaseProps extends ItemProps, PolymorphicProps<"span"> {}
33
+ interface RatingGroupItemProps extends HTMLProps<"span">, RatingGroupItemBaseProps {}
34
+ declare const RatingGroupItem: (props: RatingGroupItemProps) => import("solid-js").JSX.Element;
35
+ //#endregion
36
+ //#region src/components/rating-group/use-item-context.d.ts
37
+ interface UseRatingGroupItemContext extends Accessor<ItemState> {}
38
+ declare const RatingGroupItemProvider: import("solid-js").ContextProviderComponent<UseRatingGroupItemContext>, useRatingGroupItemContext: () => UseRatingGroupItemContext;
39
+ //#endregion
40
+ //#region src/components/rating-group/item-context.d.ts
41
+ interface RatingGroupItemContextProps {
42
+ children: (context: UseRatingGroupItemContext) => JSX.Element;
43
+ }
44
+ declare const RatingGroupItemContext: (props: RatingGroupItemContextProps) => JSX.Element;
45
+ //#endregion
46
+ //#region src/components/rating-group/label.d.ts
47
+ interface RatingGroupLabelBaseProps extends PolymorphicProps<"label"> {}
48
+ interface RatingGroupLabelProps extends HTMLProps<"label">, RatingGroupLabelBaseProps {}
49
+ declare const RatingGroupLabel: (props: RatingGroupLabelProps) => import("solid-js").JSX.Element;
50
+ //#endregion
51
+ //#region src/components/rating-group/root.d.ts
52
+ interface RatingGroupRootBaseProps extends UseRatingGroupProps, PolymorphicProps<"div"> {}
53
+ interface RatingGroupRootProps extends HTMLProps<"div">, RatingGroupRootBaseProps {}
54
+ declare const RatingGroupRoot: (props: RatingGroupRootProps) => import("solid-js").JSX.Element;
55
+ //#endregion
56
+ //#region src/components/rating-group/root-provider.d.ts
57
+ interface RootProviderProps {
58
+ value: UseRatingGroupReturn;
59
+ }
60
+ interface RatingGroupRootProviderBaseProps extends PolymorphicProps<"div"> {}
61
+ interface RatingGroupRootProviderProps extends HTMLProps<"div">, RootProviderProps, RatingGroupRootProviderBaseProps {}
62
+ declare const RatingGroupRootProvider: (props: RatingGroupRootProviderProps) => import("solid-js").JSX.Element;
63
+ declare namespace rating_group_d_exports {
64
+ export { RatingGroupContext as Context, RatingGroupContextProps as ContextProps, RatingGroupControl as Control, RatingGroupControlBaseProps as ControlBaseProps, RatingGroupControlProps as ControlProps, RatingGroupHiddenInput as HiddenInput, RatingGroupHiddenInputBaseProps as HiddenInputBaseProps, RatingGroupHiddenInputProps as HiddenInputProps, HoverChangeDetails, RatingGroupItem as Item, RatingGroupItemBaseProps as ItemBaseProps, RatingGroupItemContext as ItemContext, RatingGroupItemContextProps as ItemContextProps, RatingGroupItemProps as ItemProps, RatingGroupLabel as Label, RatingGroupLabelBaseProps as LabelBaseProps, RatingGroupLabelProps as LabelProps, RatingGroupRoot as Root, RatingGroupRootBaseProps as RootBaseProps, RatingGroupRootProps as RootProps, RatingGroupRootProvider as RootProvider, RatingGroupRootProviderBaseProps as RootProviderBaseProps, RatingGroupRootProviderProps as RootProviderProps, ValueChangeDetails };
65
+ }
66
+ //#endregion
67
+ export { rating_group_d_exports as RatingGroup, RatingGroupContext, type RatingGroupContextProps, RatingGroupControl, type RatingGroupControlBaseProps, type RatingGroupControlProps, RatingGroupHiddenInput, type RatingGroupHiddenInputBaseProps, type RatingGroupHiddenInputProps, type RatingGroupHoverChangeDetails, RatingGroupItem, type RatingGroupItemBaseProps, RatingGroupItemContext, type RatingGroupItemContextProps, type RatingGroupItemProps, RatingGroupLabel, type RatingGroupLabelBaseProps, type RatingGroupLabelProps, RatingGroupRoot, type RatingGroupRootBaseProps, type RatingGroupRootProps, RatingGroupRootProvider, type RatingGroupRootProviderBaseProps, type RatingGroupRootProviderProps, type RatingGroupValueChangeDetails, type UseRatingGroupContext, type UseRatingGroupItemContext, type UseRatingGroupProps, type UseRatingGroupReturn, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -0,0 +1,142 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { a as mergeProps$2, d as createContext$1, i as useMachine, l as createSplitProps, r as normalizeProps } from "./core-7QKBNp9p.js";
3
+ import { t as runIfFn } from "./run-if-fn-CjvD7VzQ.js";
4
+ import { t as wire } from "./factory-D2A7xdtl.js";
5
+ import { a as useLocaleContext, l as useEnvironmentContext } from "./providers-B-Vi5wQ7.js";
6
+ import { h as useFieldContext } from "./field-CQr_Dibp.js";
7
+ import { createMemo, createUniqueId } from "solid-js";
8
+ import { createComponent, mergeProps as mergeProps$1 } from "solid-js/web";
9
+ import * as ratingGroup from "@wirekyt/dom/machines/rating-group";
10
+ import { anatomy as ratingGroupAnatomy } from "@wirekyt/dom/machines/rating-group";
11
+ //#region src/components/rating-group/use-context.ts
12
+ const [RatingGroupProvider, useRatingGroupContext] = createContext$1({
13
+ hookName: "useRatingGroupContext",
14
+ providerName: "<RatingGroupProvider />"
15
+ });
16
+ //#endregion
17
+ //#region src/components/rating-group/context.tsx
18
+ const RatingGroupContext = (props) => props.children(useRatingGroupContext());
19
+ //#endregion
20
+ //#region src/components/rating-group/control.tsx
21
+ const RatingGroupControl = (props) => {
22
+ const ratingGroup = useRatingGroupContext();
23
+ const mergedProps = mergeProps$2(() => ratingGroup().getControlProps(), props);
24
+ return createComponent(wire.div, mergedProps);
25
+ };
26
+ //#endregion
27
+ //#region src/components/rating-group/hidden-input.tsx
28
+ const RatingGroupHiddenInput = (props) => {
29
+ const ratingGroup = useRatingGroupContext();
30
+ const mergedProps = mergeProps$2(() => ratingGroup().getHiddenInputProps(), props);
31
+ const field = useFieldContext();
32
+ return createComponent(wire.input, mergeProps$1({ get ["aria-describedby"]() {
33
+ return field?.().ariaDescribedby;
34
+ } }, mergedProps));
35
+ };
36
+ //#endregion
37
+ //#region src/components/rating-group/use-item-context.ts
38
+ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext$1({
39
+ hookName: "useRatingGroupItemContext",
40
+ providerName: "<RatingGroupItemProvider />"
41
+ });
42
+ //#endregion
43
+ //#region src/components/rating-group/item.tsx
44
+ const RatingGroupItem = (props) => {
45
+ const [itemProps, localProps] = createSplitProps()(props, ["index"]);
46
+ const api = useRatingGroupContext();
47
+ const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
48
+ return createComponent(RatingGroupItemProvider, {
49
+ value: createMemo(() => api().getItemState(itemProps)),
50
+ get children() {
51
+ return createComponent(wire.span, mergedProps);
52
+ }
53
+ });
54
+ };
55
+ //#endregion
56
+ //#region src/components/rating-group/item-context.tsx
57
+ const RatingGroupItemContext = (props) => props.children(useRatingGroupItemContext());
58
+ //#endregion
59
+ //#region src/components/rating-group/label.tsx
60
+ const RatingGroupLabel = (props) => {
61
+ const api = useRatingGroupContext();
62
+ const mergedProps = mergeProps$2(() => api().getLabelProps(), props);
63
+ return createComponent(wire.label, mergedProps);
64
+ };
65
+ //#endregion
66
+ //#region src/components/rating-group/use.ts
67
+ const useRatingGroup = (props) => {
68
+ const id = createUniqueId();
69
+ const locale = useLocaleContext();
70
+ const environment = useEnvironmentContext();
71
+ const field = useFieldContext();
72
+ const machineProps = createMemo(() => ({
73
+ id,
74
+ ids: {
75
+ label: field?.().ids.label,
76
+ hiddenInput: field?.().ids.control
77
+ },
78
+ disabled: field?.().disabled,
79
+ readOnly: field?.().readOnly,
80
+ required: field?.().required,
81
+ dir: locale().dir,
82
+ getRootNode: environment().getRootNode,
83
+ ...runIfFn(props)
84
+ }));
85
+ const service = useMachine(ratingGroup.machine, machineProps);
86
+ return createMemo(() => ratingGroup.connect(service, normalizeProps));
87
+ };
88
+ //#endregion
89
+ //#region src/components/rating-group/root.tsx
90
+ const RatingGroupRoot = (props) => {
91
+ const [useRatingProps, localProps] = createSplitProps()(props, [
92
+ "allowHalf",
93
+ "autoFocus",
94
+ "count",
95
+ "defaultValue",
96
+ "disabled",
97
+ "form",
98
+ "id",
99
+ "ids",
100
+ "name",
101
+ "onHoverChange",
102
+ "onValueChange",
103
+ "readOnly",
104
+ "required",
105
+ "translations",
106
+ "value"
107
+ ]);
108
+ const api = useRatingGroup(useRatingProps);
109
+ const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
110
+ return createComponent(RatingGroupProvider, {
111
+ value: api,
112
+ get children() {
113
+ return createComponent(wire.div, mergedProps);
114
+ }
115
+ });
116
+ };
117
+ //#endregion
118
+ //#region src/components/rating-group/root-provider.tsx
119
+ const RatingGroupRootProvider = (props) => {
120
+ const [{ value: ratingGroup }, localProps] = createSplitProps()(props, ["value"]);
121
+ const mergedProps = mergeProps$2(() => ratingGroup().getRootProps(), localProps);
122
+ return createComponent(RatingGroupProvider, {
123
+ value: ratingGroup,
124
+ get children() {
125
+ return createComponent(wire.div, mergedProps);
126
+ }
127
+ });
128
+ };
129
+ //#endregion
130
+ //#region src/components/rating-group/rating-group.ts
131
+ var rating_group_exports = /* @__PURE__ */ __exportAll({
132
+ Context: () => RatingGroupContext,
133
+ Control: () => RatingGroupControl,
134
+ HiddenInput: () => RatingGroupHiddenInput,
135
+ Item: () => RatingGroupItem,
136
+ ItemContext: () => RatingGroupItemContext,
137
+ Label: () => RatingGroupLabel,
138
+ Root: () => RatingGroupRoot,
139
+ RootProvider: () => RatingGroupRootProvider
140
+ });
141
+ //#endregion
142
+ export { rating_group_exports as RatingGroup, RatingGroupContext, RatingGroupControl, RatingGroupHiddenInput, RatingGroupItem, RatingGroupItemContext, RatingGroupLabel, RatingGroupRoot, RatingGroupRootProvider, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -0,0 +1,131 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.jsx";
2
+ import { a as mergeProps$1, d as createContext$1, i as useMachine, l as createSplitProps, r as normalizeProps } from "./core-7QKBNp9p.jsx";
3
+ import { t as runIfFn } from "./run-if-fn-CjvD7VzQ.jsx";
4
+ import { t as wire } from "./factory-DRw_slzE.jsx";
5
+ import { a as useLocaleContext, l as useEnvironmentContext } from "./providers-CqNHqLpB.jsx";
6
+ import { h as useFieldContext } from "./field-R5jVNdtK.jsx";
7
+ import { createMemo, createUniqueId } from "solid-js";
8
+ import * as ratingGroup from "@wirekyt/dom/machines/rating-group";
9
+ import { anatomy as ratingGroupAnatomy } from "@wirekyt/dom/machines/rating-group";
10
+ //#region src/components/rating-group/use-context.ts
11
+ const [RatingGroupProvider, useRatingGroupContext] = createContext$1({
12
+ hookName: "useRatingGroupContext",
13
+ providerName: "<RatingGroupProvider />"
14
+ });
15
+ //#endregion
16
+ //#region src/components/rating-group/context.tsx
17
+ const RatingGroupContext = (props) => props.children(useRatingGroupContext());
18
+ //#endregion
19
+ //#region src/components/rating-group/control.tsx
20
+ const RatingGroupControl = (props) => {
21
+ const ratingGroup = useRatingGroupContext();
22
+ const mergedProps = mergeProps$1(() => ratingGroup().getControlProps(), props);
23
+ return <wire.div {...mergedProps} />;
24
+ };
25
+ //#endregion
26
+ //#region src/components/rating-group/hidden-input.tsx
27
+ const RatingGroupHiddenInput = (props) => {
28
+ const ratingGroup = useRatingGroupContext();
29
+ const mergedProps = mergeProps$1(() => ratingGroup().getHiddenInputProps(), props);
30
+ const field = useFieldContext();
31
+ return <wire.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
32
+ };
33
+ //#endregion
34
+ //#region src/components/rating-group/use-item-context.ts
35
+ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext$1({
36
+ hookName: "useRatingGroupItemContext",
37
+ providerName: "<RatingGroupItemProvider />"
38
+ });
39
+ //#endregion
40
+ //#region src/components/rating-group/item.tsx
41
+ const RatingGroupItem = (props) => {
42
+ const [itemProps, localProps] = createSplitProps()(props, ["index"]);
43
+ const api = useRatingGroupContext();
44
+ const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
45
+ const itemState = createMemo(() => api().getItemState(itemProps));
46
+ return <RatingGroupItemProvider value={itemState}>
47
+ <wire.span {...mergedProps} />
48
+ </RatingGroupItemProvider>;
49
+ };
50
+ //#endregion
51
+ //#region src/components/rating-group/item-context.tsx
52
+ const RatingGroupItemContext = (props) => props.children(useRatingGroupItemContext());
53
+ //#endregion
54
+ //#region src/components/rating-group/label.tsx
55
+ const RatingGroupLabel = (props) => {
56
+ const api = useRatingGroupContext();
57
+ const mergedProps = mergeProps$1(() => api().getLabelProps(), props);
58
+ return <wire.label {...mergedProps} />;
59
+ };
60
+ //#endregion
61
+ //#region src/components/rating-group/use.ts
62
+ const useRatingGroup = (props) => {
63
+ const id = createUniqueId();
64
+ const locale = useLocaleContext();
65
+ const environment = useEnvironmentContext();
66
+ const field = useFieldContext();
67
+ const machineProps = createMemo(() => ({
68
+ id,
69
+ ids: {
70
+ label: field?.().ids.label,
71
+ hiddenInput: field?.().ids.control
72
+ },
73
+ disabled: field?.().disabled,
74
+ readOnly: field?.().readOnly,
75
+ required: field?.().required,
76
+ dir: locale().dir,
77
+ getRootNode: environment().getRootNode,
78
+ ...runIfFn(props)
79
+ }));
80
+ const service = useMachine(ratingGroup.machine, machineProps);
81
+ return createMemo(() => ratingGroup.connect(service, normalizeProps));
82
+ };
83
+ //#endregion
84
+ //#region src/components/rating-group/root.tsx
85
+ const RatingGroupRoot = (props) => {
86
+ const [useRatingProps, localProps] = createSplitProps()(props, [
87
+ "allowHalf",
88
+ "autoFocus",
89
+ "count",
90
+ "defaultValue",
91
+ "disabled",
92
+ "form",
93
+ "id",
94
+ "ids",
95
+ "name",
96
+ "onHoverChange",
97
+ "onValueChange",
98
+ "readOnly",
99
+ "required",
100
+ "translations",
101
+ "value"
102
+ ]);
103
+ const api = useRatingGroup(useRatingProps);
104
+ const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
105
+ return <RatingGroupProvider value={api}>
106
+ <wire.div {...mergedProps} />
107
+ </RatingGroupProvider>;
108
+ };
109
+ //#endregion
110
+ //#region src/components/rating-group/root-provider.tsx
111
+ const RatingGroupRootProvider = (props) => {
112
+ const [{ value: ratingGroup }, localProps] = createSplitProps()(props, ["value"]);
113
+ const mergedProps = mergeProps$1(() => ratingGroup().getRootProps(), localProps);
114
+ return <RatingGroupProvider value={ratingGroup}>
115
+ <wire.div {...mergedProps} />
116
+ </RatingGroupProvider>;
117
+ };
118
+ //#endregion
119
+ //#region src/components/rating-group/rating-group.ts
120
+ var rating_group_exports = /* @__PURE__ */ __exportAll({
121
+ Context: () => RatingGroupContext,
122
+ Control: () => RatingGroupControl,
123
+ HiddenInput: () => RatingGroupHiddenInput,
124
+ Item: () => RatingGroupItem,
125
+ ItemContext: () => RatingGroupItemContext,
126
+ Label: () => RatingGroupLabel,
127
+ Root: () => RatingGroupRoot,
128
+ RootProvider: () => RatingGroupRootProvider
129
+ });
130
+ //#endregion
131
+ export { rating_group_exports as RatingGroup, RatingGroupContext, RatingGroupControl, RatingGroupHiddenInput, RatingGroupItem, RatingGroupItemContext, RatingGroupLabel, RatingGroupRoot, RatingGroupRootProvider, ratingGroupAnatomy, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
@@ -0,0 +1,5 @@
1
+ //#region src/utils/run-if-fn.ts
2
+ const isFunction = (value) => typeof value === "function";
3
+ const runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
4
+ //#endregion
5
+ export { runIfFn as t };
@@ -0,0 +1,5 @@
1
+ //#region src/utils/run-if-fn.ts
2
+ const isFunction = (value) => typeof value === "function";
3
+ const runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
4
+ //#endregion
5
+ export { runIfFn as t };
@@ -0,0 +1,61 @@
1
+ import { a as Optional, n as Assign, s as PropTypes } from "./index-ClU-Lb8Z.js";
2
+ import { r as PolymorphicProps, t as HTMLProps } from "./factory-wuwfJqbU.js";
3
+ import { Accessor, JSX } from "solid-js";
4
+ import * as scrollArea from "@wirekyt/dom/machines/scroll-area";
5
+ import { ElementIds, ElementIds as ScrollAreaElementIds, ScrollToDetails, ScrollToDetails as ScrollAreaScrollToDetails, ScrollToEdge as ScrollAreaScrollToEdge, ScrollToEdgeDetails, ScrollToEdgeDetails as ScrollAreaScrollToEdgeDetails, ScrollbarProps, ScrollbarState as ScrollAreaScrollbarState, anatomy as scrollAreaAnatomy } from "@wirekyt/dom/machines/scroll-area";
6
+ //#region src/components/scroll-area/use.d.ts
7
+ interface UseScrollAreaProps extends Optional<Omit<scrollArea.Props, "dir" | "getRootNode">, "id"> {}
8
+ interface UseScrollAreaReturn extends Accessor<scrollArea.Api<PropTypes>> {}
9
+ declare const useScrollArea: (props?: UseScrollAreaProps) => UseScrollAreaReturn;
10
+ //#endregion
11
+ //#region src/components/scroll-area/use-context.d.ts
12
+ interface UseScrollAreaContext extends UseScrollAreaReturn {}
13
+ declare const ScrollAreaProvider: import("solid-js").ContextProviderComponent<UseScrollAreaContext>, useScrollAreaContext: () => UseScrollAreaContext;
14
+ //#endregion
15
+ //#region src/components/scroll-area/context.d.ts
16
+ interface ScrollAreaContextProps {
17
+ children: (context: UseScrollAreaContext) => JSX.Element;
18
+ }
19
+ declare function ScrollAreaContext(props: ScrollAreaContextProps): JSX.Element;
20
+ //#endregion
21
+ //#region src/components/scroll-area/content.d.ts
22
+ interface ScrollAreaContentBaseProps extends PolymorphicProps<"div"> {}
23
+ interface ScrollAreaContentProps extends Assign<HTMLProps<"div">, ScrollAreaContentBaseProps> {}
24
+ declare const ScrollAreaContent: (props: ScrollAreaContentProps) => import("solid-js").JSX.Element;
25
+ //#endregion
26
+ //#region src/components/scroll-area/corner.d.ts
27
+ interface ScrollAreaCornerBaseProps extends PolymorphicProps<"div"> {}
28
+ interface ScrollAreaCornerProps extends Assign<HTMLProps<"div">, ScrollAreaCornerBaseProps> {}
29
+ declare const ScrollAreaCorner: (props: ScrollAreaCornerProps) => import("solid-js").JSX.Element;
30
+ //#endregion
31
+ //#region src/components/scroll-area/root.d.ts
32
+ interface ScrollAreaRootBaseProps extends UseScrollAreaProps, PolymorphicProps<"div"> {}
33
+ interface ScrollAreaRootProps extends Assign<HTMLProps<"div">, ScrollAreaRootBaseProps> {}
34
+ declare const ScrollAreaRoot: (props: ScrollAreaRootProps) => import("solid-js").JSX.Element;
35
+ //#endregion
36
+ //#region src/components/scroll-area/root-provider.d.ts
37
+ interface ScrollAreaRootProviderBaseProps extends PolymorphicProps<"div"> {
38
+ value: UseScrollAreaContext;
39
+ }
40
+ interface ScrollAreaRootProviderProps extends Assign<HTMLProps<"div">, ScrollAreaRootProviderBaseProps> {}
41
+ declare const ScrollAreaRootProvider: (props: ScrollAreaRootProviderProps) => import("solid-js").JSX.Element;
42
+ //#endregion
43
+ //#region src/components/scroll-area/scrollbar.d.ts
44
+ interface ScrollAreaScrollbarBaseProps extends ScrollbarProps, PolymorphicProps<"div"> {}
45
+ interface ScrollAreaScrollbarProps extends Assign<HTMLProps<"div">, ScrollAreaScrollbarBaseProps> {}
46
+ declare const ScrollAreaScrollbar: (props: ScrollAreaScrollbarProps) => import("solid-js").JSX.Element;
47
+ //#endregion
48
+ //#region src/components/scroll-area/thumb.d.ts
49
+ interface ScrollAreaThumbBaseProps extends PolymorphicProps<"div"> {}
50
+ interface ScrollAreaThumbProps extends Assign<HTMLProps<"div">, ScrollAreaThumbBaseProps> {}
51
+ declare const ScrollAreaThumb: (props: ScrollAreaThumbProps) => import("solid-js").JSX.Element;
52
+ //#endregion
53
+ //#region src/components/scroll-area/viewport.d.ts
54
+ interface ScrollAreaViewportBaseProps extends PolymorphicProps<"div"> {}
55
+ interface ScrollAreaViewportProps extends Assign<HTMLProps<"div">, ScrollAreaViewportBaseProps> {}
56
+ declare const ScrollAreaViewport: (props: ScrollAreaViewportProps) => import("solid-js").JSX.Element;
57
+ declare namespace scroll_area_d_exports {
58
+ export { ScrollAreaContent as Content, ScrollAreaContentBaseProps as ContentBaseProps, ScrollAreaContentProps as ContentProps, ScrollAreaContext as Context, ScrollAreaContextProps as ContextProps, ScrollAreaCorner as Corner, ScrollAreaCornerBaseProps as CornerBaseProps, ScrollAreaCornerProps as CornerProps, ElementIds, ScrollAreaRoot as Root, ScrollAreaRootBaseProps as RootBaseProps, ScrollAreaRootProps as RootProps, ScrollAreaRootProvider as RootProvider, ScrollAreaRootProviderBaseProps as RootProviderBaseProps, ScrollAreaRootProviderProps as RootProviderProps, ScrollToDetails, ScrollToEdgeDetails, ScrollAreaScrollbar as Scrollbar, ScrollAreaScrollbarBaseProps as ScrollbarBaseProps, ScrollAreaScrollbarProps as ScrollbarProps, ScrollAreaThumb as Thumb, ScrollAreaThumbBaseProps as ThumbBaseProps, ScrollAreaThumbProps as ThumbProps, ScrollAreaViewport as Viewport, ScrollAreaViewportBaseProps as ViewportBaseProps, ScrollAreaViewportProps as ViewportProps };
59
+ }
60
+ //#endregion
61
+ export { scroll_area_d_exports as ScrollArea, ScrollAreaContent, type ScrollAreaContentBaseProps, type ScrollAreaContentProps, ScrollAreaContext, type ScrollAreaContextProps, ScrollAreaCorner, type ScrollAreaCornerBaseProps, type ScrollAreaCornerProps, type ScrollAreaElementIds, ScrollAreaRoot, type ScrollAreaRootBaseProps, type ScrollAreaRootProps, ScrollAreaRootProvider, type ScrollAreaRootProviderBaseProps, type ScrollAreaRootProviderProps, type ScrollAreaScrollToDetails, type ScrollAreaScrollToEdge, type ScrollAreaScrollToEdgeDetails, ScrollAreaScrollbar, type ScrollAreaScrollbarBaseProps, type ScrollAreaScrollbarProps, type ScrollAreaScrollbarState, ScrollAreaThumb, type ScrollAreaThumbBaseProps, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportBaseProps, type ScrollAreaViewportProps, type UseScrollAreaContext, type UseScrollAreaProps, type UseScrollAreaReturn, scrollAreaAnatomy, useScrollArea, useScrollAreaContext };
@@ -0,0 +1,119 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { a as mergeProps$2, d as createContext$1, i as useMachine, l as createSplitProps, r as normalizeProps } from "./core-7QKBNp9p.js";
3
+ import { t as wire } from "./factory-D2A7xdtl.js";
4
+ import { a as useLocaleContext, l as useEnvironmentContext } from "./providers-B-Vi5wQ7.js";
5
+ import { createMemo, createUniqueId } from "solid-js";
6
+ import { createComponent, mergeProps as mergeProps$1 } from "solid-js/web";
7
+ import * as scrollArea from "@wirekyt/dom/machines/scroll-area";
8
+ import { anatomy as scrollAreaAnatomy } from "@wirekyt/dom/machines/scroll-area";
9
+ //#region src/components/scroll-area/use-context.ts
10
+ const [ScrollAreaProvider, useScrollAreaContext] = createContext$1({
11
+ hookName: "useScrollAreaContext",
12
+ providerName: "<ScrollAreaProvider />"
13
+ });
14
+ //#endregion
15
+ //#region src/components/scroll-area/context.tsx
16
+ function ScrollAreaContext(props) {
17
+ return props.children(useScrollAreaContext());
18
+ }
19
+ //#endregion
20
+ //#region src/components/scroll-area/content.tsx
21
+ const ScrollAreaContent = (props) => {
22
+ const scrollArea = useScrollAreaContext();
23
+ const mergedProps = mergeProps$2(() => scrollArea().getContentProps(), props);
24
+ return createComponent(wire.div, mergedProps);
25
+ };
26
+ //#endregion
27
+ //#region src/components/scroll-area/corner.tsx
28
+ const ScrollAreaCorner = (props) => {
29
+ const scrollArea = useScrollAreaContext();
30
+ const mergedProps = mergeProps$2(() => scrollArea().getCornerProps(), props);
31
+ return createComponent(wire.div, mergedProps);
32
+ };
33
+ //#endregion
34
+ //#region src/components/scroll-area/use.ts
35
+ const useScrollArea = (props = {}) => {
36
+ const id = createUniqueId();
37
+ const locale = useLocaleContext();
38
+ const environment = useEnvironmentContext();
39
+ const machineProps = createMemo(() => ({
40
+ id,
41
+ dir: locale().dir,
42
+ getRootNode: environment().getRootNode,
43
+ ...props
44
+ }));
45
+ const service = useMachine(scrollArea.machine, machineProps);
46
+ return createMemo(() => scrollArea.connect(service, normalizeProps));
47
+ };
48
+ //#endregion
49
+ //#region src/components/scroll-area/root.tsx
50
+ const ScrollAreaRoot = (props) => {
51
+ const [useScrollAreaProps, localProps] = createSplitProps()(props, ["id", "ids"]);
52
+ const scrollArea = useScrollArea(useScrollAreaProps);
53
+ const mergedProps = mergeProps$2(() => scrollArea().getRootProps(), localProps);
54
+ return createComponent(ScrollAreaProvider, {
55
+ value: scrollArea,
56
+ get children() {
57
+ return createComponent(wire.div, mergedProps);
58
+ }
59
+ });
60
+ };
61
+ //#endregion
62
+ //#region src/components/scroll-area/root-provider.tsx
63
+ const ScrollAreaRootProvider = (props) => {
64
+ const { value, children, ...localProps } = props;
65
+ return createComponent(ScrollAreaProvider, {
66
+ value,
67
+ get children() {
68
+ return createComponent(wire.div, mergeProps$1(localProps, { children }));
69
+ }
70
+ });
71
+ };
72
+ //#endregion
73
+ //#region src/components/scroll-area/use-scrollbar-context.ts
74
+ const [ScrollAreaScrollbarProvider, useScrollAreaScrollbarContext] = createContext$1({
75
+ hookName: "useScrollAreaScrollbarContext",
76
+ providerName: "<ScrollAreaScrollbarProvider />"
77
+ });
78
+ //#endregion
79
+ //#region src/components/scroll-area/scrollbar.tsx
80
+ const ScrollAreaScrollbar = (props) => {
81
+ const [scrollbarProps, localProps] = createSplitProps()(props, ["orientation"]);
82
+ const scrollArea = useScrollAreaContext();
83
+ const mergedProps = mergeProps$2(() => scrollArea().getScrollbarProps(scrollbarProps), localProps);
84
+ return createComponent(ScrollAreaScrollbarProvider, {
85
+ value: scrollbarProps,
86
+ get children() {
87
+ return createComponent(wire.div, mergedProps);
88
+ }
89
+ });
90
+ };
91
+ //#endregion
92
+ //#region src/components/scroll-area/thumb.tsx
93
+ const ScrollAreaThumb = (props) => {
94
+ const scrollAreaApi = useScrollAreaContext();
95
+ const scrollbarProps = useScrollAreaScrollbarContext();
96
+ const mergedProps = mergeProps$2(() => scrollAreaApi().getThumbProps(scrollbarProps), props);
97
+ return createComponent(wire.div, mergedProps);
98
+ };
99
+ //#endregion
100
+ //#region src/components/scroll-area/viewport.tsx
101
+ const ScrollAreaViewport = (props) => {
102
+ const scrollArea = useScrollAreaContext();
103
+ const mergedProps = mergeProps$2(() => scrollArea().getViewportProps(), props);
104
+ return createComponent(wire.div, mergedProps);
105
+ };
106
+ //#endregion
107
+ //#region src/components/scroll-area/scroll-area.ts
108
+ var scroll_area_exports = /* @__PURE__ */ __exportAll({
109
+ Content: () => ScrollAreaContent,
110
+ Context: () => ScrollAreaContext,
111
+ Corner: () => ScrollAreaCorner,
112
+ Root: () => ScrollAreaRoot,
113
+ RootProvider: () => ScrollAreaRootProvider,
114
+ Scrollbar: () => ScrollAreaScrollbar,
115
+ Thumb: () => ScrollAreaThumb,
116
+ Viewport: () => ScrollAreaViewport
117
+ });
118
+ //#endregion
119
+ export { scroll_area_exports as ScrollArea, ScrollAreaContent, ScrollAreaContext, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaRootProvider, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, scrollAreaAnatomy, useScrollArea, useScrollAreaContext };