@wirekyt/solid 0.0.1 → 0.0.3

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,166 @@
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 numberInput from "@wirekyt/dom/machines/number-input";
10
+ import { anatomy as numberInputAnatomy } from "@wirekyt/dom/machines/number-input";
11
+ //#region src/components/number-input/use-context.ts
12
+ const [NumberInputProvider, useNumberInputContext] = createContext$1({
13
+ hookName: "useNumberInputContext",
14
+ providerName: "<NumberInputProvider />"
15
+ });
16
+ //#endregion
17
+ //#region src/components/number-input/context.tsx
18
+ const NumberInputContext = (props) => props.children(useNumberInputContext());
19
+ //#endregion
20
+ //#region src/components/number-input/control.tsx
21
+ const NumberInputControl = (props) => {
22
+ const api = useNumberInputContext();
23
+ const mergedProps = mergeProps$2(() => api().getControlProps(), props);
24
+ return createComponent(wire.div, mergedProps);
25
+ };
26
+ //#endregion
27
+ //#region src/components/number-input/decrement-trigger.tsx
28
+ const NumberInputDecrementTrigger = (props) => {
29
+ const api = useNumberInputContext();
30
+ const mergedProps = mergeProps$2(() => api().getDecrementTriggerProps(), props);
31
+ return createComponent(wire.button, mergedProps);
32
+ };
33
+ //#endregion
34
+ //#region src/components/number-input/increment-trigger.tsx
35
+ const NumberInputIncrementTrigger = (props) => {
36
+ const api = useNumberInputContext();
37
+ const mergedProps = mergeProps$2(() => api().getIncrementTriggerProps(), props);
38
+ return createComponent(wire.button, mergedProps);
39
+ };
40
+ //#endregion
41
+ //#region src/components/number-input/input.tsx
42
+ const NumberInputInput = (props) => {
43
+ const api = useNumberInputContext();
44
+ const mergedProps = mergeProps$2(() => api().getInputProps(), props);
45
+ const field = useFieldContext();
46
+ return createComponent(wire.input, mergeProps$1({ get ["aria-describedby"]() {
47
+ return field?.().ariaDescribedby;
48
+ } }, mergedProps));
49
+ };
50
+ //#endregion
51
+ //#region src/components/number-input/label.tsx
52
+ const NumberInputLabel = (props) => {
53
+ const api = useNumberInputContext();
54
+ const mergedProps = mergeProps$2(() => api().getLabelProps(), props);
55
+ return createComponent(wire.label, mergedProps);
56
+ };
57
+ //#endregion
58
+ //#region src/components/number-input/use.ts
59
+ const useNumberInput = (props) => {
60
+ const id = createUniqueId();
61
+ const locale = useLocaleContext();
62
+ const environment = useEnvironmentContext();
63
+ const field = useFieldContext();
64
+ const machineProps = createMemo(() => ({
65
+ id,
66
+ ids: {
67
+ label: field?.().ids.label,
68
+ input: field?.().ids.control
69
+ },
70
+ disabled: field?.().disabled,
71
+ readOnly: field?.().readOnly,
72
+ required: field?.().required,
73
+ invalid: field?.().invalid,
74
+ dir: locale().dir,
75
+ locale: locale().locale,
76
+ getRootNode: environment().getRootNode,
77
+ ...runIfFn(props)
78
+ }));
79
+ const service = useMachine(numberInput.machine, machineProps);
80
+ return createMemo(() => numberInput.connect(service, normalizeProps));
81
+ };
82
+ //#endregion
83
+ //#region src/components/number-input/root.tsx
84
+ const NumberInputRoot = (props) => {
85
+ const [useNumberInputProps, localProps] = createSplitProps()(props, [
86
+ "allowMouseWheel",
87
+ "allowOverflow",
88
+ "clampValueOnBlur",
89
+ "defaultValue",
90
+ "disabled",
91
+ "focusInputOnChange",
92
+ "form",
93
+ "formatOptions",
94
+ "id",
95
+ "ids",
96
+ "inputMode",
97
+ "invalid",
98
+ "largeStep",
99
+ "locale",
100
+ "max",
101
+ "min",
102
+ "name",
103
+ "onFocusChange",
104
+ "onValueChange",
105
+ "onValueCommit",
106
+ "onValueInvalid",
107
+ "pattern",
108
+ "readOnly",
109
+ "required",
110
+ "smallStep",
111
+ "spinOnPress",
112
+ "step",
113
+ "translations",
114
+ "value"
115
+ ]);
116
+ const api = useNumberInput(useNumberInputProps);
117
+ const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
118
+ return createComponent(NumberInputProvider, {
119
+ value: api,
120
+ get children() {
121
+ return createComponent(wire.div, mergedProps);
122
+ }
123
+ });
124
+ };
125
+ //#endregion
126
+ //#region src/components/number-input/root-provider.tsx
127
+ const NumberInputRootProvider = (props) => {
128
+ const [{ value: numberInput }, localProps] = createSplitProps()(props, ["value"]);
129
+ const mergedProps = mergeProps$2(() => numberInput().getRootProps(), localProps);
130
+ return createComponent(NumberInputProvider, {
131
+ value: numberInput,
132
+ get children() {
133
+ return createComponent(wire.div, mergedProps);
134
+ }
135
+ });
136
+ };
137
+ //#endregion
138
+ //#region src/components/number-input/scrubber.tsx
139
+ const NumberInputScrubber = (props) => {
140
+ const api = useNumberInputContext();
141
+ const mergedProps = mergeProps$2(() => api().getScrubberProps(), props);
142
+ return createComponent(wire.div, mergedProps);
143
+ };
144
+ //#endregion
145
+ //#region src/components/number-input/value-text.tsx
146
+ const NumberInputValueText = (props) => {
147
+ const numberInput = useNumberInputContext();
148
+ const mergedProps = mergeProps$2(() => numberInput().getValueTextProps(), props);
149
+ return createComponent(wire.span, mergedProps);
150
+ };
151
+ //#endregion
152
+ //#region src/components/number-input/number-input.ts
153
+ var number_input_exports = /* @__PURE__ */ __exportAll({
154
+ Context: () => NumberInputContext,
155
+ Control: () => NumberInputControl,
156
+ DecrementTrigger: () => NumberInputDecrementTrigger,
157
+ IncrementTrigger: () => NumberInputIncrementTrigger,
158
+ Input: () => NumberInputInput,
159
+ Label: () => NumberInputLabel,
160
+ Root: () => NumberInputRoot,
161
+ RootProvider: () => NumberInputRootProvider,
162
+ Scrubber: () => NumberInputScrubber,
163
+ ValueText: () => NumberInputValueText
164
+ });
165
+ //#endregion
166
+ export { number_input_exports as NumberInput, NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, numberInputAnatomy, useNumberInput, useNumberInputContext };
@@ -0,0 +1,157 @@
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 numberInput from "@wirekyt/dom/machines/number-input";
9
+ import { anatomy as numberInputAnatomy } from "@wirekyt/dom/machines/number-input";
10
+ //#region src/components/number-input/use-context.ts
11
+ const [NumberInputProvider, useNumberInputContext] = createContext$1({
12
+ hookName: "useNumberInputContext",
13
+ providerName: "<NumberInputProvider />"
14
+ });
15
+ //#endregion
16
+ //#region src/components/number-input/context.tsx
17
+ const NumberInputContext = (props) => props.children(useNumberInputContext());
18
+ //#endregion
19
+ //#region src/components/number-input/control.tsx
20
+ const NumberInputControl = (props) => {
21
+ const api = useNumberInputContext();
22
+ const mergedProps = mergeProps$1(() => api().getControlProps(), props);
23
+ return <wire.div {...mergedProps} />;
24
+ };
25
+ //#endregion
26
+ //#region src/components/number-input/decrement-trigger.tsx
27
+ const NumberInputDecrementTrigger = (props) => {
28
+ const api = useNumberInputContext();
29
+ const mergedProps = mergeProps$1(() => api().getDecrementTriggerProps(), props);
30
+ return <wire.button {...mergedProps} />;
31
+ };
32
+ //#endregion
33
+ //#region src/components/number-input/increment-trigger.tsx
34
+ const NumberInputIncrementTrigger = (props) => {
35
+ const api = useNumberInputContext();
36
+ const mergedProps = mergeProps$1(() => api().getIncrementTriggerProps(), props);
37
+ return <wire.button {...mergedProps} />;
38
+ };
39
+ //#endregion
40
+ //#region src/components/number-input/input.tsx
41
+ const NumberInputInput = (props) => {
42
+ const api = useNumberInputContext();
43
+ const mergedProps = mergeProps$1(() => api().getInputProps(), props);
44
+ const field = useFieldContext();
45
+ return <wire.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
46
+ };
47
+ //#endregion
48
+ //#region src/components/number-input/label.tsx
49
+ const NumberInputLabel = (props) => {
50
+ const api = useNumberInputContext();
51
+ const mergedProps = mergeProps$1(() => api().getLabelProps(), props);
52
+ return <wire.label {...mergedProps} />;
53
+ };
54
+ //#endregion
55
+ //#region src/components/number-input/use.ts
56
+ const useNumberInput = (props) => {
57
+ const id = createUniqueId();
58
+ const locale = useLocaleContext();
59
+ const environment = useEnvironmentContext();
60
+ const field = useFieldContext();
61
+ const machineProps = createMemo(() => ({
62
+ id,
63
+ ids: {
64
+ label: field?.().ids.label,
65
+ input: field?.().ids.control
66
+ },
67
+ disabled: field?.().disabled,
68
+ readOnly: field?.().readOnly,
69
+ required: field?.().required,
70
+ invalid: field?.().invalid,
71
+ dir: locale().dir,
72
+ locale: locale().locale,
73
+ getRootNode: environment().getRootNode,
74
+ ...runIfFn(props)
75
+ }));
76
+ const service = useMachine(numberInput.machine, machineProps);
77
+ return createMemo(() => numberInput.connect(service, normalizeProps));
78
+ };
79
+ //#endregion
80
+ //#region src/components/number-input/root.tsx
81
+ const NumberInputRoot = (props) => {
82
+ const [useNumberInputProps, localProps] = createSplitProps()(props, [
83
+ "allowMouseWheel",
84
+ "allowOverflow",
85
+ "clampValueOnBlur",
86
+ "defaultValue",
87
+ "disabled",
88
+ "focusInputOnChange",
89
+ "form",
90
+ "formatOptions",
91
+ "id",
92
+ "ids",
93
+ "inputMode",
94
+ "invalid",
95
+ "largeStep",
96
+ "locale",
97
+ "max",
98
+ "min",
99
+ "name",
100
+ "onFocusChange",
101
+ "onValueChange",
102
+ "onValueCommit",
103
+ "onValueInvalid",
104
+ "pattern",
105
+ "readOnly",
106
+ "required",
107
+ "smallStep",
108
+ "spinOnPress",
109
+ "step",
110
+ "translations",
111
+ "value"
112
+ ]);
113
+ const api = useNumberInput(useNumberInputProps);
114
+ const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
115
+ return <NumberInputProvider value={api}>
116
+ <wire.div {...mergedProps} />
117
+ </NumberInputProvider>;
118
+ };
119
+ //#endregion
120
+ //#region src/components/number-input/root-provider.tsx
121
+ const NumberInputRootProvider = (props) => {
122
+ const [{ value: numberInput }, localProps] = createSplitProps()(props, ["value"]);
123
+ const mergedProps = mergeProps$1(() => numberInput().getRootProps(), localProps);
124
+ return <NumberInputProvider value={numberInput}>
125
+ <wire.div {...mergedProps} />
126
+ </NumberInputProvider>;
127
+ };
128
+ //#endregion
129
+ //#region src/components/number-input/scrubber.tsx
130
+ const NumberInputScrubber = (props) => {
131
+ const api = useNumberInputContext();
132
+ const mergedProps = mergeProps$1(() => api().getScrubberProps(), props);
133
+ return <wire.div {...mergedProps} />;
134
+ };
135
+ //#endregion
136
+ //#region src/components/number-input/value-text.tsx
137
+ const NumberInputValueText = (props) => {
138
+ const numberInput = useNumberInputContext();
139
+ const mergedProps = mergeProps$1(() => numberInput().getValueTextProps(), props);
140
+ return <wire.span {...mergedProps} />;
141
+ };
142
+ //#endregion
143
+ //#region src/components/number-input/number-input.ts
144
+ var number_input_exports = /* @__PURE__ */ __exportAll({
145
+ Context: () => NumberInputContext,
146
+ Control: () => NumberInputControl,
147
+ DecrementTrigger: () => NumberInputDecrementTrigger,
148
+ IncrementTrigger: () => NumberInputIncrementTrigger,
149
+ Input: () => NumberInputInput,
150
+ Label: () => NumberInputLabel,
151
+ Root: () => NumberInputRoot,
152
+ RootProvider: () => NumberInputRootProvider,
153
+ Scrubber: () => NumberInputScrubber,
154
+ ValueText: () => NumberInputValueText
155
+ });
156
+ //#endregion
157
+ export { number_input_exports as NumberInput, NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, numberInputAnatomy, useNumberInput, useNumberInputContext };
@@ -0,0 +1,67 @@
1
+ import { a as Optional, n as Assign, 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 pagination from "@wirekyt/dom/machines/pagination";
5
+ import { EllipsisProps, ItemLabelDetails, ItemLabelDetails as PaginationItemLabelDetails, ItemProps, PageChangeDetails, PageChangeDetails as PaginationPageChangeDetails, PageSizeChangeDetails, PageSizeChangeDetails as PaginationPageSizeChangeDetails, PageUrlDetails, PageUrlDetails as PaginationPageUrlDetails, anatomy as paginationAnatomy } from "@wirekyt/dom/machines/pagination";
6
+ //#region src/components/pagination/use.d.ts
7
+ interface UsePaginationProps extends Optional<Omit<pagination.Props, "dir" | "getRootNode">, "id"> {}
8
+ interface UsePaginationReturn extends Accessor<pagination.Api<PropTypes>> {}
9
+ declare const usePagination: (props?: MaybeAccessor<UsePaginationProps>) => UsePaginationReturn;
10
+ //#endregion
11
+ //#region src/components/pagination/use-context.d.ts
12
+ interface UsePaginationContext extends UsePaginationReturn {}
13
+ declare const PaginationProvider: import("solid-js").ContextProviderComponent<UsePaginationContext>, usePaginationContext: () => UsePaginationContext;
14
+ //#endregion
15
+ //#region src/components/pagination/context.d.ts
16
+ interface PaginationContextProps {
17
+ children: (context: UsePaginationContext) => JSX.Element;
18
+ }
19
+ declare const PaginationContext: (props: PaginationContextProps) => JSX.Element;
20
+ //#endregion
21
+ //#region src/components/pagination/ellipsis.d.ts
22
+ interface PaginationEllipsisBaseProps extends EllipsisProps, PolymorphicProps<"div"> {}
23
+ interface PaginationEllipsisProps extends HTMLProps<"div">, PaginationEllipsisBaseProps {}
24
+ declare const PaginationEllipsis: (props: PaginationEllipsisProps) => import("solid-js").JSX.Element;
25
+ //#endregion
26
+ //#region src/components/pagination/first-trigger.d.ts
27
+ interface PaginationFirstTriggerBaseProps extends PolymorphicProps<"button"> {}
28
+ interface PaginationFirstTriggerProps extends HTMLProps<"button">, PaginationFirstTriggerBaseProps {}
29
+ declare const PaginationFirstTrigger: (props: PaginationFirstTriggerProps) => import("solid-js").JSX.Element;
30
+ //#endregion
31
+ //#region src/components/pagination/item.d.ts
32
+ interface PaginationItemBaseProps extends ItemProps, PolymorphicProps<"button"> {}
33
+ interface PaginationItemProps extends Assign<HTMLProps<"button">, PaginationItemBaseProps> {}
34
+ declare const PaginationItem: (props: PaginationItemProps) => import("solid-js").JSX.Element;
35
+ //#endregion
36
+ //#region src/components/pagination/last-trigger.d.ts
37
+ interface PaginationLastTriggerBaseProps extends PolymorphicProps<"button"> {}
38
+ interface PaginationLastTriggerProps extends HTMLProps<"button">, PaginationLastTriggerBaseProps {}
39
+ declare const PaginationLastTrigger: (props: PaginationLastTriggerProps) => import("solid-js").JSX.Element;
40
+ //#endregion
41
+ //#region src/components/pagination/next-trigger.d.ts
42
+ interface PaginationNextTriggerBaseProps extends PolymorphicProps<"button"> {}
43
+ interface PaginationNextTriggerProps extends HTMLProps<"button">, PaginationNextTriggerBaseProps {}
44
+ declare const PaginationNextTrigger: (props: PaginationNextTriggerProps) => import("solid-js").JSX.Element;
45
+ //#endregion
46
+ //#region src/components/pagination/prev-trigger.d.ts
47
+ interface PaginationPrevTriggerBaseProps extends PolymorphicProps<"button"> {}
48
+ interface PaginationPrevTriggerProps extends HTMLProps<"button">, PaginationPrevTriggerBaseProps {}
49
+ declare const PaginationPrevTrigger: (props: PaginationPrevTriggerProps) => import("solid-js").JSX.Element;
50
+ //#endregion
51
+ //#region src/components/pagination/root.d.ts
52
+ interface PaginationRootBaseProps extends UsePaginationProps, PolymorphicProps<"nav"> {}
53
+ interface PaginationRootProps extends HTMLProps<"nav">, PaginationRootBaseProps {}
54
+ declare const PaginationRoot: (props: PaginationRootProps) => import("solid-js").JSX.Element;
55
+ //#endregion
56
+ //#region src/components/pagination/root-provider.d.ts
57
+ interface RootProviderProps {
58
+ value: UsePaginationReturn;
59
+ }
60
+ interface PaginationRootProviderBaseProps extends PolymorphicProps<"nav"> {}
61
+ interface PaginationRootProviderProps extends HTMLProps<"nav">, RootProviderProps, PaginationRootProviderBaseProps {}
62
+ declare const PaginationRootProvider: (props: PaginationRootProviderProps) => import("solid-js").JSX.Element;
63
+ declare namespace pagination_d_exports {
64
+ export { PaginationContext as Context, PaginationContextProps as ContextProps, PaginationEllipsis as Ellipsis, PaginationEllipsisBaseProps as EllipsisBaseProps, PaginationEllipsisProps as EllipsisProps, PaginationFirstTrigger as FirstTrigger, PaginationFirstTriggerBaseProps as FirstTriggerBaseProps, PaginationFirstTriggerProps as FirstTriggerProps, PaginationItem as Item, PaginationItemBaseProps as ItemBaseProps, ItemLabelDetails, PaginationItemProps as ItemProps, PaginationLastTrigger as LastTrigger, PaginationLastTriggerBaseProps as LastTriggerBaseProps, PaginationLastTriggerProps as LastTriggerProps, PaginationNextTrigger as NextTrigger, PaginationNextTriggerBaseProps as NextTriggerBaseProps, PaginationNextTriggerProps as NextTriggerProps, PageChangeDetails, PageSizeChangeDetails, PageUrlDetails, PaginationPrevTrigger as PrevTrigger, PaginationPrevTriggerBaseProps as PrevTriggerBaseProps, PaginationPrevTriggerProps as PrevTriggerProps, PaginationRoot as Root, PaginationRootBaseProps as RootBaseProps, PaginationRootProps as RootProps, PaginationRootProvider as RootProvider, PaginationRootProviderBaseProps as RootProviderBaseProps, PaginationRootProviderProps as RootProviderProps };
65
+ }
66
+ //#endregion
67
+ export { pagination_d_exports as Pagination, PaginationContext, type PaginationContextProps, PaginationEllipsis, type PaginationEllipsisBaseProps, type PaginationEllipsisProps, PaginationFirstTrigger, type PaginationFirstTriggerBaseProps, type PaginationFirstTriggerProps, PaginationItem, type PaginationItemBaseProps, type PaginationItemLabelDetails, type PaginationItemProps, PaginationLastTrigger, type PaginationLastTriggerBaseProps, type PaginationLastTriggerProps, PaginationNextTrigger, type PaginationNextTriggerBaseProps, type PaginationNextTriggerProps, type PaginationPageChangeDetails, type PaginationPageSizeChangeDetails, type PaginationPageUrlDetails, PaginationPrevTrigger, type PaginationPrevTriggerBaseProps, type PaginationPrevTriggerProps, PaginationRoot, type PaginationRootBaseProps, type PaginationRootProps, PaginationRootProvider, type PaginationRootProviderBaseProps, type PaginationRootProviderProps, type UsePaginationContext, type UsePaginationProps, type UsePaginationReturn, paginationAnatomy, usePagination, usePaginationContext };
@@ -0,0 +1,131 @@
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 { createMemo, createUniqueId } from "solid-js";
7
+ import { createComponent } from "solid-js/web";
8
+ import * as pagination from "@wirekyt/dom/machines/pagination";
9
+ import { anatomy as paginationAnatomy } from "@wirekyt/dom/machines/pagination";
10
+ //#region src/components/pagination/use-context.ts
11
+ const [PaginationProvider, usePaginationContext] = createContext$1({
12
+ hookName: "usePaginationContext",
13
+ providerName: "<PaginationProvider />"
14
+ });
15
+ //#endregion
16
+ //#region src/components/pagination/context.tsx
17
+ const PaginationContext = (props) => props.children(usePaginationContext());
18
+ //#endregion
19
+ //#region src/components/pagination/ellipsis.tsx
20
+ const PaginationEllipsis = (props) => {
21
+ const [ellipsisProps, localProps] = createSplitProps()(props, ["index"]);
22
+ const api = usePaginationContext();
23
+ const mergedProps = mergeProps$2(() => api().getEllipsisProps(ellipsisProps), localProps);
24
+ return createComponent(wire.div, mergedProps);
25
+ };
26
+ //#endregion
27
+ //#region src/components/pagination/first-trigger.tsx
28
+ const PaginationFirstTrigger = (props) => {
29
+ const api = usePaginationContext();
30
+ const mergedProps = mergeProps$2(() => api().getFirstTriggerProps(), props);
31
+ return createComponent(wire.button, mergedProps);
32
+ };
33
+ //#endregion
34
+ //#region src/components/pagination/item.tsx
35
+ const PaginationItem = (props) => {
36
+ const [itemProps, localProps] = createSplitProps()(props, ["value", "type"]);
37
+ const api = usePaginationContext();
38
+ const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
39
+ return createComponent(wire.button, mergedProps);
40
+ };
41
+ //#endregion
42
+ //#region src/components/pagination/last-trigger.tsx
43
+ const PaginationLastTrigger = (props) => {
44
+ const api = usePaginationContext();
45
+ const mergedProps = mergeProps$2(() => api().getLastTriggerProps(), props);
46
+ return createComponent(wire.button, mergedProps);
47
+ };
48
+ //#endregion
49
+ //#region src/components/pagination/next-trigger.tsx
50
+ const PaginationNextTrigger = (props) => {
51
+ const api = usePaginationContext();
52
+ const mergedProps = mergeProps$2(() => api().getNextTriggerProps(), props);
53
+ return createComponent(wire.button, mergedProps);
54
+ };
55
+ //#endregion
56
+ //#region src/components/pagination/prev-trigger.tsx
57
+ const PaginationPrevTrigger = (props) => {
58
+ const api = usePaginationContext();
59
+ const mergedProps = mergeProps$2(() => api().getPrevTriggerProps(), props);
60
+ return createComponent(wire.button, mergedProps);
61
+ };
62
+ //#endregion
63
+ //#region src/components/pagination/use.ts
64
+ const usePagination = (props) => {
65
+ const locale = useLocaleContext();
66
+ const environment = useEnvironmentContext();
67
+ const id = createUniqueId();
68
+ const machineProps = createMemo(() => ({
69
+ id,
70
+ dir: locale().dir,
71
+ getRootNode: environment().getRootNode,
72
+ ...runIfFn(props)
73
+ }));
74
+ const service = useMachine(pagination.machine, machineProps);
75
+ return createMemo(() => pagination.connect(service, normalizeProps));
76
+ };
77
+ //#endregion
78
+ //#region src/components/pagination/root.tsx
79
+ const PaginationRoot = (props) => {
80
+ const [usePaginationProps, localProps] = createSplitProps()(props, [
81
+ "boundaryCount",
82
+ "count",
83
+ "defaultPage",
84
+ "defaultPageSize",
85
+ "getPageUrl",
86
+ "id",
87
+ "ids",
88
+ "onPageChange",
89
+ "onPageSizeChange",
90
+ "page",
91
+ "pageSize",
92
+ "siblingCount",
93
+ "translations",
94
+ "type"
95
+ ]);
96
+ const api = usePagination(usePaginationProps);
97
+ const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
98
+ return createComponent(PaginationProvider, {
99
+ value: api,
100
+ get children() {
101
+ return createComponent(wire.nav, mergedProps);
102
+ }
103
+ });
104
+ };
105
+ //#endregion
106
+ //#region src/components/pagination/root-provider.tsx
107
+ const PaginationRootProvider = (props) => {
108
+ const [{ value: pagination }, localProps] = createSplitProps()(props, ["value"]);
109
+ const mergedProps = mergeProps$2(() => pagination().getRootProps(), localProps);
110
+ return createComponent(PaginationProvider, {
111
+ value: pagination,
112
+ get children() {
113
+ return createComponent(wire.nav, mergedProps);
114
+ }
115
+ });
116
+ };
117
+ //#endregion
118
+ //#region src/components/pagination/pagination.ts
119
+ var pagination_exports = /* @__PURE__ */ __exportAll({
120
+ Context: () => PaginationContext,
121
+ Ellipsis: () => PaginationEllipsis,
122
+ FirstTrigger: () => PaginationFirstTrigger,
123
+ Item: () => PaginationItem,
124
+ LastTrigger: () => PaginationLastTrigger,
125
+ NextTrigger: () => PaginationNextTrigger,
126
+ PrevTrigger: () => PaginationPrevTrigger,
127
+ Root: () => PaginationRoot,
128
+ RootProvider: () => PaginationRootProvider
129
+ });
130
+ //#endregion
131
+ export { pagination_exports as Pagination, PaginationContext, PaginationEllipsis, PaginationFirstTrigger, PaginationItem, PaginationLastTrigger, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };
@@ -0,0 +1,124 @@
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 { createMemo, createUniqueId } from "solid-js";
7
+ import * as pagination from "@wirekyt/dom/machines/pagination";
8
+ import { anatomy as paginationAnatomy } from "@wirekyt/dom/machines/pagination";
9
+ //#region src/components/pagination/use-context.ts
10
+ const [PaginationProvider, usePaginationContext] = createContext$1({
11
+ hookName: "usePaginationContext",
12
+ providerName: "<PaginationProvider />"
13
+ });
14
+ //#endregion
15
+ //#region src/components/pagination/context.tsx
16
+ const PaginationContext = (props) => props.children(usePaginationContext());
17
+ //#endregion
18
+ //#region src/components/pagination/ellipsis.tsx
19
+ const PaginationEllipsis = (props) => {
20
+ const [ellipsisProps, localProps] = createSplitProps()(props, ["index"]);
21
+ const api = usePaginationContext();
22
+ const mergedProps = mergeProps$1(() => api().getEllipsisProps(ellipsisProps), localProps);
23
+ return <wire.div {...mergedProps} />;
24
+ };
25
+ //#endregion
26
+ //#region src/components/pagination/first-trigger.tsx
27
+ const PaginationFirstTrigger = (props) => {
28
+ const api = usePaginationContext();
29
+ const mergedProps = mergeProps$1(() => api().getFirstTriggerProps(), props);
30
+ return <wire.button {...mergedProps} />;
31
+ };
32
+ //#endregion
33
+ //#region src/components/pagination/item.tsx
34
+ const PaginationItem = (props) => {
35
+ const [itemProps, localProps] = createSplitProps()(props, ["value", "type"]);
36
+ const api = usePaginationContext();
37
+ const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
38
+ return <wire.button {...mergedProps} />;
39
+ };
40
+ //#endregion
41
+ //#region src/components/pagination/last-trigger.tsx
42
+ const PaginationLastTrigger = (props) => {
43
+ const api = usePaginationContext();
44
+ const mergedProps = mergeProps$1(() => api().getLastTriggerProps(), props);
45
+ return <wire.button {...mergedProps} />;
46
+ };
47
+ //#endregion
48
+ //#region src/components/pagination/next-trigger.tsx
49
+ const PaginationNextTrigger = (props) => {
50
+ const api = usePaginationContext();
51
+ const mergedProps = mergeProps$1(() => api().getNextTriggerProps(), props);
52
+ return <wire.button {...mergedProps} />;
53
+ };
54
+ //#endregion
55
+ //#region src/components/pagination/prev-trigger.tsx
56
+ const PaginationPrevTrigger = (props) => {
57
+ const api = usePaginationContext();
58
+ const mergedProps = mergeProps$1(() => api().getPrevTriggerProps(), props);
59
+ return <wire.button {...mergedProps} />;
60
+ };
61
+ //#endregion
62
+ //#region src/components/pagination/use.ts
63
+ const usePagination = (props) => {
64
+ const locale = useLocaleContext();
65
+ const environment = useEnvironmentContext();
66
+ const id = createUniqueId();
67
+ const machineProps = createMemo(() => ({
68
+ id,
69
+ dir: locale().dir,
70
+ getRootNode: environment().getRootNode,
71
+ ...runIfFn(props)
72
+ }));
73
+ const service = useMachine(pagination.machine, machineProps);
74
+ return createMemo(() => pagination.connect(service, normalizeProps));
75
+ };
76
+ //#endregion
77
+ //#region src/components/pagination/root.tsx
78
+ const PaginationRoot = (props) => {
79
+ const [usePaginationProps, localProps] = createSplitProps()(props, [
80
+ "boundaryCount",
81
+ "count",
82
+ "defaultPage",
83
+ "defaultPageSize",
84
+ "getPageUrl",
85
+ "id",
86
+ "ids",
87
+ "onPageChange",
88
+ "onPageSizeChange",
89
+ "page",
90
+ "pageSize",
91
+ "siblingCount",
92
+ "translations",
93
+ "type"
94
+ ]);
95
+ const api = usePagination(usePaginationProps);
96
+ const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
97
+ return <PaginationProvider value={api}>
98
+ <wire.nav {...mergedProps} />
99
+ </PaginationProvider>;
100
+ };
101
+ //#endregion
102
+ //#region src/components/pagination/root-provider.tsx
103
+ const PaginationRootProvider = (props) => {
104
+ const [{ value: pagination }, localProps] = createSplitProps()(props, ["value"]);
105
+ const mergedProps = mergeProps$1(() => pagination().getRootProps(), localProps);
106
+ return <PaginationProvider value={pagination}>
107
+ <wire.nav {...mergedProps} />
108
+ </PaginationProvider>;
109
+ };
110
+ //#endregion
111
+ //#region src/components/pagination/pagination.ts
112
+ var pagination_exports = /* @__PURE__ */ __exportAll({
113
+ Context: () => PaginationContext,
114
+ Ellipsis: () => PaginationEllipsis,
115
+ FirstTrigger: () => PaginationFirstTrigger,
116
+ Item: () => PaginationItem,
117
+ LastTrigger: () => PaginationLastTrigger,
118
+ NextTrigger: () => PaginationNextTrigger,
119
+ PrevTrigger: () => PaginationPrevTrigger,
120
+ Root: () => PaginationRoot,
121
+ RootProvider: () => PaginationRootProvider
122
+ });
123
+ //#endregion
124
+ export { pagination_exports as Pagination, PaginationContext, PaginationEllipsis, PaginationFirstTrigger, PaginationItem, PaginationLastTrigger, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };