@sprawlify/solid 0.0.16 → 0.0.18

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 (164) hide show
  1. package/dist/{collapsible-sG-Rzvf2.jsx → collapsible-14K1NkX_.jsx} +8 -8
  2. package/dist/{collapsible-CX2tnXKq.js → collapsible-BT7AHLQr.js} +8 -8
  3. package/dist/{collection-zj3lxnwW.js → collection-BVSLJ8Vb.js} +2 -2
  4. package/dist/{collection-BRr4O2_i.jsx → collection-CIXQG-Ne.jsx} +2 -2
  5. package/dist/components/accordion/index.d.ts +11 -11
  6. package/dist/components/accordion/index.js +9 -9
  7. package/dist/components/accordion/index.jsx +9 -9
  8. package/dist/components/angle-slider/index.d.ts +13 -13
  9. package/dist/components/angle-slider/index.js +7 -7
  10. package/dist/components/angle-slider/index.jsx +7 -7
  11. package/dist/components/avatar/index.d.ts +8 -8
  12. package/dist/components/avatar/index.js +7 -7
  13. package/dist/components/avatar/index.jsx +7 -7
  14. package/dist/components/bottom-sheet/index.d.ts +13 -13
  15. package/dist/components/bottom-sheet/index.js +10 -10
  16. package/dist/components/bottom-sheet/index.jsx +10 -10
  17. package/dist/components/carousel/index.d.ts +17 -17
  18. package/dist/components/carousel/index.js +7 -7
  19. package/dist/components/carousel/index.jsx +7 -7
  20. package/dist/components/checkbox/index.d.ts +13 -13
  21. package/dist/components/checkbox/index.js +10 -10
  22. package/dist/components/checkbox/index.jsx +10 -10
  23. package/dist/components/clipboard/index.d.ts +11 -11
  24. package/dist/components/clipboard/index.js +7 -7
  25. package/dist/components/clipboard/index.jsx +7 -7
  26. package/dist/components/collapsible/index.d.ts +10 -10
  27. package/dist/components/collapsible/index.js +7 -7
  28. package/dist/components/collapsible/index.jsx +7 -7
  29. package/dist/components/collection/index.d.ts +2 -2
  30. package/dist/components/collection/index.js +2 -2
  31. package/dist/components/collection/index.jsx +2 -2
  32. package/dist/components/color-picker/index.d.ts +35 -35
  33. package/dist/components/color-picker/index.js +12 -12
  34. package/dist/components/color-picker/index.jsx +12 -12
  35. package/dist/components/combobox/index.d.ts +22 -22
  36. package/dist/components/combobox/index.js +13 -13
  37. package/dist/components/combobox/index.jsx +13 -13
  38. package/dist/components/date-picker/index.d.ts +33 -33
  39. package/dist/components/date-picker/index.js +10 -10
  40. package/dist/components/date-picker/index.jsx +10 -10
  41. package/dist/components/dialog/index.d.ts +13 -13
  42. package/dist/components/dialog/index.js +10 -10
  43. package/dist/components/dialog/index.jsx +10 -10
  44. package/dist/components/download-trigger/index.d.ts +3 -3
  45. package/dist/components/download-trigger/index.js +5 -5
  46. package/dist/components/download-trigger/index.jsx +5 -5
  47. package/dist/components/editable/index.d.ts +14 -14
  48. package/dist/components/editable/index.js +10 -10
  49. package/dist/components/editable/index.jsx +10 -10
  50. package/dist/components/field/index.d.ts +14 -14
  51. package/dist/components/field/index.js +8 -8
  52. package/dist/components/field/index.jsx +8 -8
  53. package/dist/components/fieldset/index.d.ts +12 -12
  54. package/dist/components/fieldset/index.js +7 -7
  55. package/dist/components/fieldset/index.jsx +7 -7
  56. package/dist/components/file-upload/index.d.ts +102 -0
  57. package/dist/components/file-upload/index.js +284 -0
  58. package/dist/components/file-upload/index.jsx +255 -0
  59. package/dist/components/floating-panel/index.d.ts +100 -0
  60. package/dist/components/floating-panel/index.js +246 -0
  61. package/dist/components/floating-panel/index.jsx +217 -0
  62. package/dist/components/focus-trap/index.d.ts +17 -0
  63. package/dist/components/focus-trap/index.js +34 -0
  64. package/dist/components/focus-trap/index.jsx +30 -0
  65. package/dist/components/format/index.d.ts +27 -0
  66. package/dist/components/format/index.js +46 -0
  67. package/dist/components/format/index.jsx +48 -0
  68. package/dist/components/frame/index.d.ts +13 -0
  69. package/dist/components/frame/index.js +121 -0
  70. package/dist/components/frame/index.jsx +86 -0
  71. package/dist/components/highlight/index.d.ts +3 -3
  72. package/dist/components/highlight/index.js +3 -3
  73. package/dist/components/highlight/index.jsx +3 -3
  74. package/dist/components/hover-card/index.d.ts +70 -0
  75. package/dist/components/hover-card/index.js +168 -0
  76. package/dist/components/hover-card/index.jsx +136 -0
  77. package/dist/components/image-cropper/index.d.ts +64 -0
  78. package/dist/components/image-cropper/index.js +151 -0
  79. package/dist/components/image-cropper/index.jsx +144 -0
  80. package/dist/components/json-tree-view/index.d.ts +56 -0
  81. package/dist/components/json-tree-view/index.js +330 -0
  82. package/dist/components/json-tree-view/index.jsx +204 -0
  83. package/dist/components/listbox/index.d.ts +114 -0
  84. package/dist/components/listbox/index.js +261 -0
  85. package/dist/components/listbox/index.jsx +236 -0
  86. package/dist/components/marquee/index.d.ts +59 -0
  87. package/dist/components/marquee/index.js +138 -0
  88. package/dist/components/marquee/index.jsx +126 -0
  89. package/dist/components/menu/index.d.ts +161 -0
  90. package/dist/components/menu/index.js +471 -0
  91. package/dist/components/menu/index.jsx +392 -0
  92. package/dist/components/navigation-menu/index.d.ts +90 -0
  93. package/dist/components/navigation-menu/index.js +304 -0
  94. package/dist/components/navigation-menu/index.jsx +237 -0
  95. package/dist/components/number-input/index.d.ts +74 -0
  96. package/dist/components/number-input/index.js +182 -0
  97. package/dist/components/number-input/index.jsx +173 -0
  98. package/dist/components/pagination/index.d.ts +69 -0
  99. package/dist/components/pagination/index.js +146 -0
  100. package/dist/components/pagination/index.jsx +139 -0
  101. package/dist/components/password-input/index.d.ts +66 -0
  102. package/dist/components/password-input/index.js +159 -0
  103. package/dist/components/password-input/index.jsx +140 -0
  104. package/dist/components/pin-input/index.d.ts +59 -0
  105. package/dist/components/pin-input/index.js +151 -0
  106. package/dist/components/pin-input/index.jsx +142 -0
  107. package/dist/components/popover/index.d.ts +95 -0
  108. package/dist/components/popover/index.js +220 -0
  109. package/dist/components/popover/index.jsx +188 -0
  110. package/dist/components/presence/index.d.ts +4 -4
  111. package/dist/components/presence/index.js +7 -7
  112. package/dist/components/presence/index.jsx +7 -7
  113. package/dist/components/select/index.d.ts +22 -22
  114. package/dist/components/select/index.js +13 -13
  115. package/dist/components/select/index.jsx +13 -13
  116. package/dist/components/tree-view/index.d.ts +7 -0
  117. package/dist/components/tree-view/index.js +11 -0
  118. package/dist/components/tree-view/index.jsx +11 -0
  119. package/dist/{factory-Ch5jgk20.jsx → factory-BIJk1mK6.jsx} +1 -1
  120. package/dist/{factory-PGDAvOKb.js → factory-k8EbNZ7r.js} +1 -1
  121. package/dist/{factory-4A25bngy.d.ts → factory-srnAQg4A.d.ts} +6 -1
  122. package/dist/{field-CoYiA2ek.js → field-CZv3v7K-.js} +8 -8
  123. package/dist/{field-BRr9Zdes.jsx → field-CtkmPUb0.jsx} +8 -8
  124. package/dist/{fieldset-BrJqMLEd.js → fieldset-B2nK8dL5.js} +8 -8
  125. package/dist/{fieldset-B_LyllEa.jsx → fieldset-aYQsMWX2.jsx} +8 -8
  126. package/dist/{index-GEfvAmRc.d.ts → index-BwthXhaG.d.ts} +1 -1
  127. package/dist/index-Dl22eiVf.d.ts +143 -0
  128. package/dist/index-Dqmtlqpz.d.ts +143 -0
  129. package/dist/{index-j2avJy7D.d.ts → index-DylIyeqd.d.ts} +8 -8
  130. package/dist/index-utxtRaDW.d.ts +41 -0
  131. package/dist/{index-oc8gLl07.d.ts → index-w0NPbRP3.d.ts} +8 -8
  132. package/dist/index.d.ts +6 -44
  133. package/dist/index.js +6 -5
  134. package/dist/index.jsx +6 -5
  135. package/dist/{presence-BpwBRlZW.js → presence-Clrs1hmS.js} +7 -7
  136. package/dist/{presence-Bmn43U_q.jsx → presence-H4-8_5_s.jsx} +7 -7
  137. package/dist/{providers-DFaRRd80.jsx → providers-C6VPiSrB.jsx} +2 -2
  138. package/dist/{providers-Bo0OFe08.js → providers-DgUckEdb.js} +2 -2
  139. package/dist/{render-strategy-DFlz7Uc4.js → render-strategy-BlHCR8sl.js} +2 -2
  140. package/dist/{render-strategy-CdJhRv3I.jsx → render-strategy-KJFIjVVG.jsx} +2 -2
  141. package/dist/tree-view-CyvT0V14.js +318 -0
  142. package/dist/tree-view-DJgvku6y.jsx +291 -0
  143. package/dist/utils/index.d.ts +1 -1
  144. package/dist/utils/index.js +2 -2
  145. package/dist/utils/index.jsx +2 -2
  146. package/package.json +97 -2
  147. /package/dist/{chunk-B5so6B0y.jsx → chunk-BJ7z6UrO.jsx} +0 -0
  148. /package/dist/{chunk-B93cd-Dz.js → chunk-Bn8mXcTA.js} +0 -0
  149. /package/dist/{compose-refs-BVVIB7xn.js → compose-refs-Cp4AShsY.jsx} +0 -0
  150. /package/dist/{compose-refs-icUeuyHm.jsx → compose-refs-tCBI7PRJ.js} +0 -0
  151. /package/dist/{core-DbInRfhI.jsx → core-CRjuRw95.js} +0 -0
  152. /package/dist/{core-oNB2jGcl.js → core-C_FYj4uc.jsx} +0 -0
  153. /package/dist/{create-context-C3rvZvkc.jsx → create-context-BwqlrMqL.jsx} +0 -0
  154. /package/dist/{create-context-GfQ_MylE.js → create-context-DlXBVMoq.js} +0 -0
  155. /package/dist/{create-split-props-B8A7_AF7.jsx → create-split-props-BHmgTHSf.js} +0 -0
  156. /package/dist/{create-split-props-pQu7jijw.js → create-split-props-CKwjjjkD.jsx} +0 -0
  157. /package/dist/{index-C7N791Fc.d.ts → index-BLALA3BS.d.ts} +0 -0
  158. /package/dist/{index-B6dBCfnB.d.ts → index-DiANe65S.d.ts} +0 -0
  159. /package/dist/{render-strategy-BNECKEQk.d.ts → render-strategy-BmTDUy3U.d.ts} +0 -0
  160. /package/dist/{run-if-fn-A3VwXy-o.jsx → run-if-fn-C80kt4dU.js} +0 -0
  161. /package/dist/{run-if-fn-D5794CxE.js → run-if-fn-CrJzzDIM.jsx} +0 -0
  162. /package/dist/{types-Dbw4va3W.d.ts → types-mGUbKy2h.d.ts} +0 -0
  163. /package/dist/{utils-DQi-Cen5.js → utils-DSmVDqW7.js} +0 -0
  164. /package/dist/{utils-vSjszv0W.jsx → utils-DhhcJyG-.jsx} +0 -0
@@ -0,0 +1,139 @@
1
+ import { t as __export } from "../../chunk-BJ7z6UrO.jsx";
2
+ import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-C_FYj4uc.jsx";
3
+ import { t as runIfFn } from "../../run-if-fn-CrJzzDIM.jsx";
4
+ import { t as createContext$1 } from "../../create-context-BwqlrMqL.jsx";
5
+ import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-C6VPiSrB.jsx";
6
+ import { t as sprawlify } from "../../factory-BIJk1mK6.jsx";
7
+ import { t as createSplitProps } from "../../create-split-props-CKwjjjkD.jsx";
8
+ import { createMemo, createUniqueId } from "solid-js";
9
+ import * as pagination from "@sprawlify/primitives/machines/pagination";
10
+ import { anatomy as paginationAnatomy } from "@sprawlify/primitives/machines/pagination";
11
+
12
+ //#region src/components/pagination/use-pagination-context.ts
13
+ const [PaginationProvider, usePaginationContext] = createContext$1({
14
+ hookName: "usePaginationContext",
15
+ providerName: "<PaginationProvider />"
16
+ });
17
+
18
+ //#endregion
19
+ //#region src/components/pagination/pagination-context.tsx
20
+ const PaginationContext = (props) => props.children(usePaginationContext());
21
+
22
+ //#endregion
23
+ //#region src/components/pagination/pagination-ellipsis.tsx
24
+ const PaginationEllipsis = (props) => {
25
+ const [ellipsisProps, localProps] = createSplitProps()(props, ["index"]);
26
+ const api = usePaginationContext();
27
+ const mergedProps = mergeProps$1(() => api().getEllipsisProps(ellipsisProps), localProps);
28
+ return <sprawlify.div {...mergedProps} />;
29
+ };
30
+
31
+ //#endregion
32
+ //#region src/components/pagination/pagination-first-trigger.tsx
33
+ const PaginationFirstTrigger = (props) => {
34
+ const api = usePaginationContext();
35
+ const mergedProps = mergeProps$1(() => api().getFirstTriggerProps(), props);
36
+ return <sprawlify.button {...mergedProps} />;
37
+ };
38
+
39
+ //#endregion
40
+ //#region src/components/pagination/pagination-item.tsx
41
+ const PaginationItem = (props) => {
42
+ const [itemProps, localProps] = createSplitProps()(props, ["value", "type"]);
43
+ const api = usePaginationContext();
44
+ const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
45
+ return <sprawlify.button {...mergedProps} />;
46
+ };
47
+
48
+ //#endregion
49
+ //#region src/components/pagination/pagination-last-trigger.tsx
50
+ const PaginationLastTrigger = (props) => {
51
+ const api = usePaginationContext();
52
+ const mergedProps = mergeProps$1(() => api().getLastTriggerProps(), props);
53
+ return <sprawlify.button {...mergedProps} />;
54
+ };
55
+
56
+ //#endregion
57
+ //#region src/components/pagination/pagination-next-trigger.tsx
58
+ const PaginationNextTrigger = (props) => {
59
+ const api = usePaginationContext();
60
+ const mergedProps = mergeProps$1(() => api().getNextTriggerProps(), props);
61
+ return <sprawlify.button {...mergedProps} />;
62
+ };
63
+
64
+ //#endregion
65
+ //#region src/components/pagination/pagination-prev-trigger.tsx
66
+ const PaginationPrevTrigger = (props) => {
67
+ const api = usePaginationContext();
68
+ const mergedProps = mergeProps$1(() => api().getPrevTriggerProps(), props);
69
+ return <sprawlify.button {...mergedProps} />;
70
+ };
71
+
72
+ //#endregion
73
+ //#region src/components/pagination/use-pagination.ts
74
+ const usePagination = (props) => {
75
+ const locale = useLocaleContext();
76
+ const environment = useEnvironmentContext();
77
+ const id = createUniqueId();
78
+ const machineProps = createMemo(() => ({
79
+ id,
80
+ dir: locale().dir,
81
+ getRootNode: environment().getRootNode,
82
+ ...runIfFn(props)
83
+ }));
84
+ const service = useMachine(pagination.machine, machineProps);
85
+ return createMemo(() => pagination.connect(service, normalizeProps));
86
+ };
87
+
88
+ //#endregion
89
+ //#region src/components/pagination/pagination-root.tsx
90
+ const PaginationRoot = (props) => {
91
+ const [usePaginationProps, localProps] = createSplitProps()(props, [
92
+ "boundaryCount",
93
+ "count",
94
+ "defaultPage",
95
+ "defaultPageSize",
96
+ "getPageUrl",
97
+ "id",
98
+ "ids",
99
+ "onPageChange",
100
+ "onPageSizeChange",
101
+ "page",
102
+ "pageSize",
103
+ "siblingCount",
104
+ "translations",
105
+ "type"
106
+ ]);
107
+ const api = usePagination(usePaginationProps);
108
+ const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
109
+ return <PaginationProvider value={api}>
110
+ <sprawlify.nav {...mergedProps} />
111
+ </PaginationProvider>;
112
+ };
113
+
114
+ //#endregion
115
+ //#region src/components/pagination/pagination-root-provider.tsx
116
+ const PaginationRootProvider = (props) => {
117
+ const [{ value: pagination$1 }, localProps] = createSplitProps()(props, ["value"]);
118
+ const mergedProps = mergeProps$1(() => pagination$1().getRootProps(), localProps);
119
+ return <PaginationProvider value={pagination$1}>
120
+ <sprawlify.nav {...mergedProps} />
121
+ </PaginationProvider>;
122
+ };
123
+
124
+ //#endregion
125
+ //#region src/components/pagination/pagination.ts
126
+ var pagination_exports = /* @__PURE__ */ __export({
127
+ Context: () => PaginationContext,
128
+ Ellipsis: () => PaginationEllipsis,
129
+ FirstTrigger: () => PaginationFirstTrigger,
130
+ Item: () => PaginationItem,
131
+ LastTrigger: () => PaginationLastTrigger,
132
+ NextTrigger: () => PaginationNextTrigger,
133
+ PrevTrigger: () => PaginationPrevTrigger,
134
+ Root: () => PaginationRoot,
135
+ RootProvider: () => PaginationRootProvider
136
+ });
137
+
138
+ //#endregion
139
+ export { pagination_exports as Pagination, PaginationContext, PaginationEllipsis, PaginationFirstTrigger, PaginationItem, PaginationLastTrigger, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };
@@ -0,0 +1,66 @@
1
+ import { n as PropTypes } from "../../index-BLALA3BS.js";
2
+ import { i as Optional, n as MaybeAccessor } from "../../types-mGUbKy2h.js";
3
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-srnAQg4A.js";
4
+ import * as solid_js150 from "solid-js";
5
+ import { Accessor, JSX } from "solid-js";
6
+ import * as passwordInput from "@sprawlify/primitives/machines/password-input";
7
+ import { VisibilityChangeDetails, VisibilityChangeDetails as PasswordInputVisibilityChangeDetails, anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
8
+
9
+ //#region src/components/password-input/use-password-input.d.ts
10
+ interface UsePasswordInputProps extends Optional<Omit<passwordInput.Props, 'dir' | 'getRootNode'>, 'id'> {}
11
+ interface UsePasswordInputReturn extends Accessor<passwordInput.Api<PropTypes>> {}
12
+ declare const usePasswordInput: (props?: MaybeAccessor<UsePasswordInputProps>) => UsePasswordInputReturn;
13
+ //#endregion
14
+ //#region src/components/password-input/use-password-input-context.d.ts
15
+ interface UsePasswordInputContext extends UsePasswordInputReturn {}
16
+ //#endregion
17
+ //#region src/components/password-input/password-input-context.d.ts
18
+ interface PasswordInputContextProps {
19
+ children: (context: UsePasswordInputContext) => JSX.Element;
20
+ }
21
+ declare const PasswordInputContext: (props: PasswordInputContextProps) => JSX.Element;
22
+ //#endregion
23
+ //#region src/components/password-input/password-input-control.d.ts
24
+ interface PasswordInputControlBaseProps extends PolymorphicProps<'div'> {}
25
+ interface PasswordInputControlProps extends HTMLProps<'div'>, PasswordInputControlBaseProps {}
26
+ declare const PasswordInputControl: (props: PasswordInputControlProps) => solid_js150.JSX.Element;
27
+ //#endregion
28
+ //#region src/components/password-input/password-input-indicator.d.ts
29
+ interface PasswordInputIndicatorBaseProps extends PolymorphicProps<'span'> {
30
+ fallback?: JSX.Element;
31
+ }
32
+ interface PasswordInputIndicatorProps extends HTMLProps<'span'>, PasswordInputIndicatorBaseProps {}
33
+ declare const PasswordInputIndicator: (props: PasswordInputIndicatorProps) => JSX.Element;
34
+ //#endregion
35
+ //#region src/components/password-input/password-input-input.d.ts
36
+ interface PasswordInputInputBaseProps extends PolymorphicProps<'input'> {}
37
+ interface PasswordInputInputProps extends HTMLProps<'input'>, PasswordInputInputBaseProps {}
38
+ declare const PasswordInputInput: (props: PasswordInputInputProps) => solid_js150.JSX.Element;
39
+ //#endregion
40
+ //#region src/components/password-input/password-input-label.d.ts
41
+ interface PasswordInputLabelBaseProps extends PolymorphicProps<'label'> {}
42
+ interface PasswordInputLabelProps extends HTMLProps<'label'>, PasswordInputLabelBaseProps {}
43
+ declare const PasswordInputLabel: (props: PasswordInputLabelProps) => solid_js150.JSX.Element;
44
+ //#endregion
45
+ //#region src/components/password-input/password-input-root.d.ts
46
+ interface PasswordInputRootBaseProps extends UsePasswordInputProps, PolymorphicProps<'div'> {}
47
+ interface PasswordInputRootProps extends HTMLProps<'div'>, PasswordInputRootBaseProps {}
48
+ declare const PasswordInputRoot: (props: PasswordInputRootProps) => solid_js150.JSX.Element;
49
+ //#endregion
50
+ //#region src/components/password-input/password-input-root-provider.d.ts
51
+ interface PasswordInputRootProviderBaseProps extends PolymorphicProps<'div'> {
52
+ value: UsePasswordInputContext;
53
+ children?: JSX.Element;
54
+ }
55
+ interface PasswordInputRootProviderProps extends HTMLProps<'div'>, PasswordInputRootProviderBaseProps {}
56
+ declare const PasswordInputRootProvider: (props: PasswordInputRootProviderProps) => JSX.Element;
57
+ //#endregion
58
+ //#region src/components/password-input/password-input-visibility-trigger.d.ts
59
+ interface PasswordInputVisibilityTriggerBaseProps extends PolymorphicProps<'button'> {}
60
+ interface PasswordInputVisibilityTriggerProps extends HTMLProps<'button'>, PasswordInputVisibilityTriggerBaseProps {}
61
+ declare const PasswordInputVisibilityTrigger: (props: PasswordInputVisibilityTriggerProps) => solid_js150.JSX.Element;
62
+ declare namespace password_input_d_exports {
63
+ export { PasswordInputContext as Context, PasswordInputContextProps as ContextProps, PasswordInputControl as Control, PasswordInputControlBaseProps as ControlBaseProps, PasswordInputControlProps as ControlProps, PasswordInputIndicator as Indicator, PasswordInputIndicatorBaseProps as IndicatorBaseProps, PasswordInputIndicatorProps as IndicatorProps, PasswordInputInput as Input, PasswordInputInputBaseProps as InputBaseProps, PasswordInputInputProps as InputProps, PasswordInputLabel as Label, PasswordInputLabelBaseProps as LabelBaseProps, PasswordInputLabelProps as LabelProps, PasswordInputRoot as Root, PasswordInputRootBaseProps as RootBaseProps, PasswordInputRootProps as RootProps, PasswordInputRootProvider as RootProvider, PasswordInputRootProviderBaseProps as RootProviderBaseProps, PasswordInputRootProviderProps as RootProviderProps, VisibilityChangeDetails, PasswordInputVisibilityTrigger as VisibilityTrigger, PasswordInputVisibilityTriggerBaseProps as VisibilityTriggerBaseProps, PasswordInputVisibilityTriggerProps as VisibilityTriggerProps };
64
+ }
65
+ //#endregion
66
+ export { password_input_d_exports as PasswordInput, PasswordInputContext, type PasswordInputContextProps, PasswordInputControl, type PasswordInputControlBaseProps, type PasswordInputControlProps, PasswordInputIndicator, type PasswordInputIndicatorBaseProps, type PasswordInputIndicatorProps, PasswordInputInput, type PasswordInputInputBaseProps, type PasswordInputInputProps, PasswordInputLabel, type PasswordInputLabelBaseProps, type PasswordInputLabelProps, PasswordInputRoot, type PasswordInputRootBaseProps, type PasswordInputRootProps, PasswordInputRootProvider, type PasswordInputRootProviderBaseProps, type PasswordInputRootProviderProps, type PasswordInputVisibilityChangeDetails, PasswordInputVisibilityTrigger, type PasswordInputVisibilityTriggerBaseProps, type PasswordInputVisibilityTriggerProps, type UsePasswordInputContext, type UsePasswordInputProps, type UsePasswordInputReturn, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
@@ -0,0 +1,159 @@
1
+ import { t as __export } from "../../chunk-Bn8mXcTA.js";
2
+ import { i as useMachine, n as normalizeProps, r as mergeProps$2 } from "../../core-CRjuRw95.js";
3
+ import { t as runIfFn } from "../../run-if-fn-C80kt4dU.js";
4
+ import { t as createContext$1 } from "../../create-context-DlXBVMoq.js";
5
+ import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-DgUckEdb.js";
6
+ import { t as sprawlify } from "../../factory-k8EbNZ7r.js";
7
+ import { t as createSplitProps } from "../../create-split-props-BHmgTHSf.js";
8
+ import "../../compose-refs-tCBI7PRJ.js";
9
+ import "../../fieldset-B2nK8dL5.js";
10
+ import { m as useFieldContext } from "../../field-CZv3v7K-.js";
11
+ import { Show, createMemo, createUniqueId } from "solid-js";
12
+ import { createComponent, mergeProps as mergeProps$1 } from "solid-js/web";
13
+ import * as passwordInput from "@sprawlify/primitives/machines/password-input";
14
+ import { anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
15
+
16
+ //#region src/components/password-input/use-password-input-context.ts
17
+ const [PasswordInputProvider, usePasswordInputContext] = createContext$1({
18
+ hookName: "usePasswordInputContext",
19
+ providerName: "<PasswordInputProvider />"
20
+ });
21
+
22
+ //#endregion
23
+ //#region src/components/password-input/password-input-context.tsx
24
+ const PasswordInputContext = (props) => props.children(usePasswordInputContext());
25
+
26
+ //#endregion
27
+ //#region src/components/password-input/password-input-control.tsx
28
+ const PasswordInputControl = (props) => {
29
+ const passwordInput$1 = usePasswordInputContext();
30
+ const mergedProps = mergeProps$2(() => passwordInput$1().getControlProps(), props);
31
+ return createComponent(sprawlify.div, mergedProps);
32
+ };
33
+
34
+ //#endregion
35
+ //#region src/components/password-input/password-input-indicator.tsx
36
+ const PasswordInputIndicator = (props) => {
37
+ const passwordInput$1 = usePasswordInputContext();
38
+ const mergedProps = mergeProps$2(() => passwordInput$1().getIndicatorProps(), props);
39
+ return createComponent(sprawlify.span, mergeProps$1(mergedProps, { get children() {
40
+ return createComponent(Show, {
41
+ get when() {
42
+ return passwordInput$1().visible;
43
+ },
44
+ get fallback() {
45
+ return props.fallback;
46
+ },
47
+ get children() {
48
+ return props.children;
49
+ }
50
+ });
51
+ } }));
52
+ };
53
+
54
+ //#endregion
55
+ //#region src/components/password-input/password-input-input.tsx
56
+ const PasswordInputInput = (props) => {
57
+ const passwordInput$1 = usePasswordInputContext();
58
+ const mergedProps = mergeProps$2(() => passwordInput$1().getInputProps(), props);
59
+ const field = useFieldContext();
60
+ return createComponent(sprawlify.input, mergeProps$1({ get ["aria-describedby"]() {
61
+ return field?.().ariaDescribedby;
62
+ } }, mergedProps));
63
+ };
64
+
65
+ //#endregion
66
+ //#region src/components/password-input/password-input-label.tsx
67
+ const PasswordInputLabel = (props) => {
68
+ const passwordInput$1 = usePasswordInputContext();
69
+ const mergedProps = mergeProps$2(() => passwordInput$1().getLabelProps(), props);
70
+ return createComponent(sprawlify.label, mergedProps);
71
+ };
72
+
73
+ //#endregion
74
+ //#region src/components/password-input/use-password-input.ts
75
+ const usePasswordInput = (props) => {
76
+ const id = createUniqueId();
77
+ const locale = useLocaleContext();
78
+ const environment = useEnvironmentContext();
79
+ const field = useFieldContext();
80
+ const machineProps = createMemo(() => ({
81
+ id,
82
+ ids: { input: field?.().ids.control },
83
+ disabled: field?.().disabled,
84
+ readOnly: field?.().readOnly,
85
+ required: field?.().required,
86
+ invalid: field?.().invalid,
87
+ dir: locale().dir,
88
+ getRootNode: environment().getRootNode,
89
+ ...runIfFn(props)
90
+ }));
91
+ const service = useMachine(passwordInput.machine, machineProps);
92
+ return createMemo(() => passwordInput.connect(service, normalizeProps));
93
+ };
94
+
95
+ //#endregion
96
+ //#region src/components/password-input/password-input-root.tsx
97
+ const PasswordInputRoot = (props) => {
98
+ const [usePasswordInputProps, localProps] = createSplitProps()(props, [
99
+ "autoComplete",
100
+ "defaultVisible",
101
+ "disabled",
102
+ "id",
103
+ "ids",
104
+ "ignorePasswordManagers",
105
+ "invalid",
106
+ "name",
107
+ "onVisibilityChange",
108
+ "readOnly",
109
+ "required",
110
+ "translations",
111
+ "visible"
112
+ ]);
113
+ const passwordInput$1 = usePasswordInput(usePasswordInputProps);
114
+ const mergedProps = mergeProps$2(() => passwordInput$1().getRootProps(), localProps);
115
+ return createComponent(PasswordInputProvider, {
116
+ value: passwordInput$1,
117
+ get children() {
118
+ return createComponent(sprawlify.div, mergedProps);
119
+ }
120
+ });
121
+ };
122
+
123
+ //#endregion
124
+ //#region src/components/password-input/password-input-root-provider.tsx
125
+ const PasswordInputRootProvider = (props) => {
126
+ const mergedProps = mergeProps$2(() => props.value().getRootProps(), props);
127
+ return createComponent(PasswordInputProvider, {
128
+ get value() {
129
+ return props.value;
130
+ },
131
+ get children() {
132
+ return createComponent(sprawlify.div, mergedProps);
133
+ }
134
+ });
135
+ };
136
+
137
+ //#endregion
138
+ //#region src/components/password-input/password-input-visibility-trigger.tsx
139
+ const PasswordInputVisibilityTrigger = (props) => {
140
+ const passwordInput$1 = usePasswordInputContext();
141
+ const mergedProps = mergeProps$2(() => passwordInput$1().getVisibilityTriggerProps(), props);
142
+ return createComponent(sprawlify.button, mergedProps);
143
+ };
144
+
145
+ //#endregion
146
+ //#region src/components/password-input/password-input.ts
147
+ var password_input_exports = /* @__PURE__ */ __export({
148
+ Context: () => PasswordInputContext,
149
+ Control: () => PasswordInputControl,
150
+ Indicator: () => PasswordInputIndicator,
151
+ Input: () => PasswordInputInput,
152
+ Label: () => PasswordInputLabel,
153
+ Root: () => PasswordInputRoot,
154
+ RootProvider: () => PasswordInputRootProvider,
155
+ VisibilityTrigger: () => PasswordInputVisibilityTrigger
156
+ });
157
+
158
+ //#endregion
159
+ export { password_input_exports as PasswordInput, PasswordInputContext, PasswordInputControl, PasswordInputIndicator, PasswordInputInput, PasswordInputLabel, PasswordInputRoot, PasswordInputRootProvider, PasswordInputVisibilityTrigger, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
@@ -0,0 +1,140 @@
1
+ import { t as __export } from "../../chunk-BJ7z6UrO.jsx";
2
+ import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-C_FYj4uc.jsx";
3
+ import { t as runIfFn } from "../../run-if-fn-CrJzzDIM.jsx";
4
+ import { t as createContext$1 } from "../../create-context-BwqlrMqL.jsx";
5
+ import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-C6VPiSrB.jsx";
6
+ import { t as sprawlify } from "../../factory-BIJk1mK6.jsx";
7
+ import { t as createSplitProps } from "../../create-split-props-CKwjjjkD.jsx";
8
+ import "../../compose-refs-Cp4AShsY.jsx";
9
+ import "../../fieldset-aYQsMWX2.jsx";
10
+ import { m as useFieldContext } from "../../field-CtkmPUb0.jsx";
11
+ import { Show, createMemo, createUniqueId } from "solid-js";
12
+ import * as passwordInput from "@sprawlify/primitives/machines/password-input";
13
+ import { anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
14
+
15
+ //#region src/components/password-input/use-password-input-context.ts
16
+ const [PasswordInputProvider, usePasswordInputContext] = createContext$1({
17
+ hookName: "usePasswordInputContext",
18
+ providerName: "<PasswordInputProvider />"
19
+ });
20
+
21
+ //#endregion
22
+ //#region src/components/password-input/password-input-context.tsx
23
+ const PasswordInputContext = (props) => props.children(usePasswordInputContext());
24
+
25
+ //#endregion
26
+ //#region src/components/password-input/password-input-control.tsx
27
+ const PasswordInputControl = (props) => {
28
+ const passwordInput$1 = usePasswordInputContext();
29
+ const mergedProps = mergeProps$1(() => passwordInput$1().getControlProps(), props);
30
+ return <sprawlify.div {...mergedProps} />;
31
+ };
32
+
33
+ //#endregion
34
+ //#region src/components/password-input/password-input-indicator.tsx
35
+ const PasswordInputIndicator = (props) => {
36
+ const passwordInput$1 = usePasswordInputContext();
37
+ const mergedProps = mergeProps$1(() => passwordInput$1().getIndicatorProps(), props);
38
+ return <sprawlify.span {...mergedProps}>
39
+ <Show when={passwordInput$1().visible} fallback={props.fallback}>
40
+ {props.children}
41
+ </Show>
42
+ </sprawlify.span>;
43
+ };
44
+
45
+ //#endregion
46
+ //#region src/components/password-input/password-input-input.tsx
47
+ const PasswordInputInput = (props) => {
48
+ const passwordInput$1 = usePasswordInputContext();
49
+ const mergedProps = mergeProps$1(() => passwordInput$1().getInputProps(), props);
50
+ const field = useFieldContext();
51
+ return <sprawlify.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
52
+ };
53
+
54
+ //#endregion
55
+ //#region src/components/password-input/password-input-label.tsx
56
+ const PasswordInputLabel = (props) => {
57
+ const passwordInput$1 = usePasswordInputContext();
58
+ const mergedProps = mergeProps$1(() => passwordInput$1().getLabelProps(), props);
59
+ return <sprawlify.label {...mergedProps} />;
60
+ };
61
+
62
+ //#endregion
63
+ //#region src/components/password-input/use-password-input.ts
64
+ const usePasswordInput = (props) => {
65
+ const id = createUniqueId();
66
+ const locale = useLocaleContext();
67
+ const environment = useEnvironmentContext();
68
+ const field = useFieldContext();
69
+ const machineProps = createMemo(() => ({
70
+ id,
71
+ ids: { input: field?.().ids.control },
72
+ disabled: field?.().disabled,
73
+ readOnly: field?.().readOnly,
74
+ required: field?.().required,
75
+ invalid: field?.().invalid,
76
+ dir: locale().dir,
77
+ getRootNode: environment().getRootNode,
78
+ ...runIfFn(props)
79
+ }));
80
+ const service = useMachine(passwordInput.machine, machineProps);
81
+ return createMemo(() => passwordInput.connect(service, normalizeProps));
82
+ };
83
+
84
+ //#endregion
85
+ //#region src/components/password-input/password-input-root.tsx
86
+ const PasswordInputRoot = (props) => {
87
+ const [usePasswordInputProps, localProps] = createSplitProps()(props, [
88
+ "autoComplete",
89
+ "defaultVisible",
90
+ "disabled",
91
+ "id",
92
+ "ids",
93
+ "ignorePasswordManagers",
94
+ "invalid",
95
+ "name",
96
+ "onVisibilityChange",
97
+ "readOnly",
98
+ "required",
99
+ "translations",
100
+ "visible"
101
+ ]);
102
+ const passwordInput$1 = usePasswordInput(usePasswordInputProps);
103
+ const mergedProps = mergeProps$1(() => passwordInput$1().getRootProps(), localProps);
104
+ return <PasswordInputProvider value={passwordInput$1}>
105
+ <sprawlify.div {...mergedProps} />
106
+ </PasswordInputProvider>;
107
+ };
108
+
109
+ //#endregion
110
+ //#region src/components/password-input/password-input-root-provider.tsx
111
+ const PasswordInputRootProvider = (props) => {
112
+ const mergedProps = mergeProps$1(() => props.value().getRootProps(), props);
113
+ return <PasswordInputProvider value={props.value}>
114
+ <sprawlify.div {...mergedProps} />
115
+ </PasswordInputProvider>;
116
+ };
117
+
118
+ //#endregion
119
+ //#region src/components/password-input/password-input-visibility-trigger.tsx
120
+ const PasswordInputVisibilityTrigger = (props) => {
121
+ const passwordInput$1 = usePasswordInputContext();
122
+ const mergedProps = mergeProps$1(() => passwordInput$1().getVisibilityTriggerProps(), props);
123
+ return <sprawlify.button {...mergedProps} />;
124
+ };
125
+
126
+ //#endregion
127
+ //#region src/components/password-input/password-input.ts
128
+ var password_input_exports = /* @__PURE__ */ __export({
129
+ Context: () => PasswordInputContext,
130
+ Control: () => PasswordInputControl,
131
+ Indicator: () => PasswordInputIndicator,
132
+ Input: () => PasswordInputInput,
133
+ Label: () => PasswordInputLabel,
134
+ Root: () => PasswordInputRoot,
135
+ RootProvider: () => PasswordInputRootProvider,
136
+ VisibilityTrigger: () => PasswordInputVisibilityTrigger
137
+ });
138
+
139
+ //#endregion
140
+ export { password_input_exports as PasswordInput, PasswordInputContext, PasswordInputControl, PasswordInputIndicator, PasswordInputInput, PasswordInputLabel, PasswordInputRoot, PasswordInputRootProvider, PasswordInputVisibilityTrigger, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
@@ -0,0 +1,59 @@
1
+ import { n as PropTypes } from "../../index-BLALA3BS.js";
2
+ import { i as Optional, n as MaybeAccessor } from "../../types-mGUbKy2h.js";
3
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-srnAQg4A.js";
4
+ import * as solid_js208 from "solid-js";
5
+ import { Accessor, JSX } from "solid-js";
6
+ import * as pinInput from "@sprawlify/primitives/machines/pin-input";
7
+ import { InputProps, ValueChangeDetails, ValueChangeDetails as PinInputValueChangeDetails, ValueInvalidDetails, ValueInvalidDetails as PinInputValueInvalidDetails, anatomy as pinInputAnatomy } from "@sprawlify/primitives/machines/pin-input";
8
+
9
+ //#region src/components/pin-input/use-pin-input.d.ts
10
+ interface UsePinInputProps extends Optional<Omit<pinInput.Props, 'dir' | 'getRootNode'>, 'id'> {}
11
+ interface UsePinInputReturn extends Accessor<pinInput.Api<PropTypes>> {}
12
+ declare const usePinInput: (props?: MaybeAccessor<UsePinInputProps>) => UsePinInputReturn;
13
+ //#endregion
14
+ //#region src/components/pin-input/use-pin-input-context.d.ts
15
+ interface UsePinInputContext extends UsePinInputReturn {}
16
+ //#endregion
17
+ //#region src/components/pin-input/pin-input-context.d.ts
18
+ interface PinInputContextProps {
19
+ children: (context: UsePinInputContext) => JSX.Element;
20
+ }
21
+ declare const PinInputContext: (props: PinInputContextProps) => JSX.Element;
22
+ //#endregion
23
+ //#region src/components/pin-input/pin-input-control.d.ts
24
+ interface PinInputControlBaseProps extends PolymorphicProps<'div'> {}
25
+ interface PinInputControlProps extends HTMLProps<'div'>, PinInputControlBaseProps {}
26
+ declare const PinInputControl: (props: PinInputControlProps) => solid_js208.JSX.Element;
27
+ //#endregion
28
+ //#region src/components/pin-input/pin-input-hidden-input.d.ts
29
+ interface PinInputHiddenInputBaseProps extends PolymorphicProps<'input'> {}
30
+ interface PinInputHiddenInputProps extends HTMLProps<'input'>, PinInputHiddenInputBaseProps {}
31
+ declare const PinInputHiddenInput: (props: PinInputHiddenInputProps) => solid_js208.JSX.Element;
32
+ //#endregion
33
+ //#region src/components/pin-input/pin-input-input.d.ts
34
+ interface PinInputInputBaseProps extends InputProps, PolymorphicProps<'input'> {}
35
+ interface PinInputInputProps extends HTMLProps<'input'>, PinInputInputBaseProps {}
36
+ declare const PinInputInput: (props: PinInputInputProps) => solid_js208.JSX.Element;
37
+ //#endregion
38
+ //#region src/components/pin-input/pin-input-label.d.ts
39
+ interface PinInputLabelBaseProps extends PolymorphicProps<'label'> {}
40
+ interface PinInputLabelProps extends HTMLProps<'label'>, PinInputLabelBaseProps {}
41
+ declare const PinInputLabel: (props: PinInputLabelProps) => solid_js208.JSX.Element;
42
+ //#endregion
43
+ //#region src/components/pin-input/pin-input-root.d.ts
44
+ interface PinInputRootBaseProps extends UsePinInputProps, PolymorphicProps<'div'> {}
45
+ interface PinInputRootProps extends HTMLProps<'div'>, PinInputRootBaseProps {}
46
+ declare const PinInputRoot: (props: PinInputRootProps) => solid_js208.JSX.Element;
47
+ //#endregion
48
+ //#region src/components/pin-input/pin-input-root-provider.d.ts
49
+ interface RootProviderProps {
50
+ value: UsePinInputReturn;
51
+ }
52
+ interface PinInputRootProviderBaseProps extends PolymorphicProps<'div'> {}
53
+ interface PinInputRootProviderProps extends HTMLProps<'div'>, RootProviderProps, PinInputRootProviderBaseProps {}
54
+ declare const PinInputRootProvider: (props: PinInputRootProviderProps) => solid_js208.JSX.Element;
55
+ declare namespace pin_input_d_exports {
56
+ export { PinInputContext as Context, PinInputContextProps as ContextProps, PinInputControl as Control, PinInputControlBaseProps as ControlBaseProps, PinInputControlProps as ControlProps, PinInputHiddenInput as HiddenInput, PinInputHiddenInputBaseProps as HiddenInputBaseProps, PinInputHiddenInputProps as HiddenInputProps, PinInputInput as Input, PinInputInputBaseProps as InputBaseProps, PinInputInputProps as InputProps, PinInputLabel as Label, PinInputLabelBaseProps as LabelBaseProps, PinInputLabelProps as LabelProps, PinInputRoot as Root, PinInputRootBaseProps as RootBaseProps, PinInputRootProps as RootProps, PinInputRootProvider as RootProvider, PinInputRootProviderBaseProps as RootProviderBaseProps, PinInputRootProviderProps as RootProviderProps, ValueChangeDetails, ValueInvalidDetails };
57
+ }
58
+ //#endregion
59
+ export { pin_input_d_exports as PinInput, PinInputContext, type PinInputContextProps, PinInputControl, type PinInputControlBaseProps, type PinInputControlProps, PinInputHiddenInput, type PinInputHiddenInputBaseProps, type PinInputHiddenInputProps, PinInputInput, type PinInputInputBaseProps, type PinInputInputProps, PinInputLabel, type PinInputLabelBaseProps, type PinInputLabelProps, PinInputRoot, type PinInputRootBaseProps, type PinInputRootProps, PinInputRootProvider, type PinInputRootProviderBaseProps, type PinInputRootProviderProps, type PinInputValueChangeDetails, type PinInputValueInvalidDetails, type UsePinInputContext, type UsePinInputProps, type UsePinInputReturn, pinInputAnatomy, usePinInput, usePinInputContext };