@sprawlify/react 0.0.8 → 0.0.9

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 (179) hide show
  1. package/dist/{collapsible-Nbt3Sequ.mjs → collapsible-vqmKK3px.mjs} +7 -7
  2. package/dist/{collection-DQWWySNV.mjs → collection-BYYMj_V8.mjs} +2 -2
  3. package/dist/components/accordion/index.d.cts +11 -11
  4. package/dist/components/accordion/index.d.mts +11 -11
  5. package/dist/components/accordion/index.mjs +10 -10
  6. package/dist/components/angle-slider/index.d.cts +13 -13
  7. package/dist/components/angle-slider/index.d.mts +13 -13
  8. package/dist/components/angle-slider/index.mjs +8 -8
  9. package/dist/components/avatar/index.d.cts +8 -8
  10. package/dist/components/avatar/index.d.mts +8 -8
  11. package/dist/components/avatar/index.mjs +8 -8
  12. package/dist/components/bottom-sheet/index.d.cts +15 -15
  13. package/dist/components/bottom-sheet/index.d.mts +16 -16
  14. package/dist/components/bottom-sheet/index.mjs +12 -12
  15. package/dist/components/carousel/index.d.cts +18 -18
  16. package/dist/components/carousel/index.d.mts +18 -18
  17. package/dist/components/carousel/index.mjs +8 -8
  18. package/dist/components/checkbox/index.d.cts +14 -14
  19. package/dist/components/checkbox/index.d.mts +14 -14
  20. package/dist/components/checkbox/index.mjs +13 -13
  21. package/dist/components/clipboard/index.d.cts +12 -12
  22. package/dist/components/clipboard/index.d.mts +12 -12
  23. package/dist/components/clipboard/index.mjs +6 -6
  24. package/dist/components/collapsible/index.d.cts +10 -10
  25. package/dist/components/collapsible/index.d.mts +10 -10
  26. package/dist/components/collapsible/index.mjs +7 -7
  27. package/dist/components/collection/index.d.cts +1 -1
  28. package/dist/components/collection/index.d.mts +1 -1
  29. package/dist/components/collection/index.mjs +3 -3
  30. package/dist/components/color-picker/index.d.cts +35 -35
  31. package/dist/components/color-picker/index.d.mts +36 -36
  32. package/dist/components/color-picker/index.mjs +14 -14
  33. package/dist/components/combobox/index.d.cts +22 -22
  34. package/dist/components/combobox/index.d.mts +22 -22
  35. package/dist/components/combobox/index.mjs +15 -15
  36. package/dist/components/date-picker/index.d.cts +32 -32
  37. package/dist/components/date-picker/index.d.mts +33 -33
  38. package/dist/components/date-picker/index.mjs +11 -11
  39. package/dist/components/dialog/index.d.cts +15 -15
  40. package/dist/components/dialog/index.d.mts +13 -13
  41. package/dist/components/dialog/index.mjs +11 -11
  42. package/dist/components/download-trigger/index.d.cts +4 -4
  43. package/dist/components/download-trigger/index.d.mts +4 -4
  44. package/dist/components/download-trigger/index.mjs +5 -5
  45. package/dist/components/editable/index.d.cts +13 -13
  46. package/dist/components/editable/index.d.mts +13 -13
  47. package/dist/components/editable/index.mjs +11 -11
  48. package/dist/components/field/index.d.cts +14 -14
  49. package/dist/components/field/index.d.mts +12 -12
  50. package/dist/components/field/index.mjs +9 -9
  51. package/dist/components/fieldset/index.d.cts +10 -10
  52. package/dist/components/fieldset/index.d.mts +8 -8
  53. package/dist/components/fieldset/index.mjs +9 -9
  54. package/dist/components/file-upload/index.d.cts +3 -3
  55. package/dist/components/file-upload/index.d.mts +18 -18
  56. package/dist/components/file-upload/index.mjs +11 -11
  57. package/dist/components/floating-panel/index.d.cts +19 -19
  58. package/dist/components/floating-panel/index.d.mts +20 -20
  59. package/dist/components/floating-panel/index.mjs +11 -11
  60. package/dist/components/focus-trap/index.d.cts +4 -4
  61. package/dist/components/focus-trap/index.d.mts +4 -4
  62. package/dist/components/focus-trap/index.mjs +4 -4
  63. package/dist/components/format/index.d.cts +4 -4
  64. package/dist/components/format/index.d.mts +4 -4
  65. package/dist/components/format/index.mjs +3 -3
  66. package/dist/components/frame/index.d.cts +3 -3
  67. package/dist/components/frame/index.d.mts +3 -3
  68. package/dist/components/frame/index.mjs +6 -6
  69. package/dist/components/highlight/index.d.cts +3 -3
  70. package/dist/components/highlight/index.d.mts +3 -3
  71. package/dist/components/highlight/index.mjs +1 -1
  72. package/dist/components/hover-card/index.cjs +165 -0
  73. package/dist/components/hover-card/index.d.cts +70 -0
  74. package/dist/components/hover-card/index.d.mts +71 -0
  75. package/dist/components/hover-card/index.mjs +143 -0
  76. package/dist/components/image-cropper/index.cjs +197 -0
  77. package/dist/components/image-cropper/index.d.cts +64 -0
  78. package/dist/components/image-cropper/index.d.mts +64 -0
  79. package/dist/components/image-cropper/index.mjs +175 -0
  80. package/dist/components/json-tree-view/index.cjs +246 -0
  81. package/dist/components/json-tree-view/index.d.cts +43 -0
  82. package/dist/components/json-tree-view/index.d.mts +48 -0
  83. package/dist/components/json-tree-view/index.mjs +237 -0
  84. package/dist/components/listbox/index.cjs +314 -0
  85. package/dist/components/listbox/index.d.cts +110 -0
  86. package/dist/components/listbox/index.d.mts +110 -0
  87. package/dist/components/listbox/index.mjs +289 -0
  88. package/dist/components/marquee/index.cjs +176 -0
  89. package/dist/components/marquee/index.d.cts +61 -0
  90. package/dist/components/marquee/index.d.mts +61 -0
  91. package/dist/components/marquee/index.mjs +155 -0
  92. package/dist/components/menu/index.cjs +548 -0
  93. package/dist/components/menu/index.d.cts +159 -0
  94. package/dist/components/menu/index.d.mts +162 -0
  95. package/dist/components/menu/index.mjs +512 -0
  96. package/dist/components/navigation-menu/index.cjs +339 -0
  97. package/dist/components/navigation-menu/index.d.cts +90 -0
  98. package/dist/components/navigation-menu/index.d.mts +90 -0
  99. package/dist/components/navigation-menu/index.mjs +312 -0
  100. package/dist/components/number-input/index.cjs +237 -0
  101. package/dist/components/number-input/index.d.cts +74 -0
  102. package/dist/components/number-input/index.d.mts +74 -0
  103. package/dist/components/number-input/index.mjs +213 -0
  104. package/dist/components/pagination/index.cjs +197 -0
  105. package/dist/components/pagination/index.d.cts +69 -0
  106. package/dist/components/pagination/index.d.mts +69 -0
  107. package/dist/components/pagination/index.mjs +174 -0
  108. package/dist/components/password-input/index.cjs +193 -0
  109. package/dist/components/password-input/index.d.cts +66 -0
  110. package/dist/components/password-input/index.d.mts +66 -0
  111. package/dist/components/password-input/index.mjs +171 -0
  112. package/dist/components/pin-input/index.cjs +192 -0
  113. package/dist/components/pin-input/index.d.cts +59 -0
  114. package/dist/components/pin-input/index.d.mts +59 -0
  115. package/dist/components/pin-input/index.mjs +171 -0
  116. package/dist/components/popover/index.cjs +237 -0
  117. package/dist/components/popover/index.d.cts +95 -0
  118. package/dist/components/popover/index.d.mts +96 -0
  119. package/dist/components/popover/index.mjs +210 -0
  120. package/dist/components/portal/index.cjs +3 -29
  121. package/dist/components/portal/index.d.cts +2 -2
  122. package/dist/components/portal/index.d.mts +2 -2
  123. package/dist/components/portal/index.mjs +5 -30
  124. package/dist/components/presence/index.d.cts +1 -1
  125. package/dist/components/presence/index.d.mts +3 -3
  126. package/dist/components/presence/index.mjs +5 -5
  127. package/dist/components/select/index.d.cts +21 -21
  128. package/dist/components/select/index.d.mts +22 -22
  129. package/dist/components/select/index.mjs +15 -15
  130. package/dist/components/tree-view/index.cjs +51 -0
  131. package/dist/components/tree-view/index.d.cts +3 -0
  132. package/dist/components/tree-view/index.d.mts +6 -0
  133. package/dist/components/tree-view/index.mjs +13 -0
  134. package/dist/{environment-Ded7DkGr.mjs → environment-Cc02I6aF.mjs} +1 -1
  135. package/dist/{factory-Bi8oEg8i.mjs → factory-7ydMApfi.mjs} +1 -1
  136. package/dist/{field-B-6qoKdn.mjs → field-BXY6su53.mjs} +9 -9
  137. package/dist/{fieldset-gaVneDYh.mjs → fieldset-BeHm9oxe.mjs} +8 -8
  138. package/dist/index-BcXWsxRa.d.mts +40 -0
  139. package/dist/{index-BhGgEHWc.d.cts → index-Bkxp7VrU.d.mts} +7 -7
  140. package/dist/index-Cquz7y70.d.cts +52 -0
  141. package/dist/index-DTzLUoop.d.cts +150 -0
  142. package/dist/{index-Cp1i1zbg.d.mts → index-aYGfRRLA.d.cts} +7 -7
  143. package/dist/index-wlpTZGhs.d.mts +150 -0
  144. package/dist/index.d.cts +6 -56
  145. package/dist/index.d.mts +6 -44
  146. package/dist/index.mjs +7 -7
  147. package/dist/{locale-Coin-d7R.mjs → locale-D4LX0eEq.mjs} +1 -1
  148. package/dist/portal-BOhFScBS.mjs +29 -0
  149. package/dist/portal-DRyJqgA1.cjs +35 -0
  150. package/dist/{presence-Bc6Bxe5i.mjs → presence-C9BcvdTf.mjs} +6 -6
  151. package/dist/{render-strategy-FiPgAp1U.mjs → render-strategy-BgIBKraZ.mjs} +2 -2
  152. package/dist/tree-view-CzJvwlYQ.mjs +365 -0
  153. package/dist/tree-view-DsOPEocd.cjs +509 -0
  154. package/dist/{use-fieldset-context-LwveT1OS.mjs → use-fieldset-context-6GRSrrlt.mjs} +1 -1
  155. package/dist/utils/index.d.cts +1 -1
  156. package/dist/utils/index.d.mts +1 -1
  157. package/dist/utils/index.mjs +2 -2
  158. package/package.json +132 -2
  159. /package/dist/{chunk-BXPHTOwk.mjs → chunk-BU8PiJgx.mjs} +0 -0
  160. /package/dist/{compose-refs-BEptPEkE.mjs → compose-refs-Cl5LpASY.mjs} +0 -0
  161. /package/dist/{core-Ba4IEjhK.mjs → core-79NSyZp-.mjs} +0 -0
  162. /package/dist/{create-context-CCXzjEv8.mjs → create-context-DbhrVE2B.mjs} +0 -0
  163. /package/dist/{create-split-props-CBL0m-GX.mjs → create-split-props-BJdRM9I_.mjs} +0 -0
  164. /package/dist/{factory-C-EBNsCW.d.mts → factory-DaVlp4Ba.d.mts} +0 -0
  165. /package/dist/{factory-C4cfTHs7.d.cts → factory-fcFI3pbG.d.cts} +0 -0
  166. /package/dist/{index-BJvW7OpY.d.mts → index-BLd57Y0z.d.mts} +0 -0
  167. /package/dist/{index-CureNJdc.d.mts → index-BoLg0FWF.d.mts} +0 -0
  168. /package/dist/{index-CumJbg8V.d.cts → index-CReeoTjv.d.cts} +0 -0
  169. /package/dist/{index-ByIsf4E7.d.mts → index-DPoOdvOg.d.mts} +0 -0
  170. /package/dist/{index-dbTyAXLy.d.cts → index-r8rv70-L.d.cts} +0 -0
  171. /package/dist/{normalize-props-skGwa8Dk.d.cts → normalize-props-Dw0EepzR.d.cts} +0 -0
  172. /package/dist/{providers-Dm2P3F2_.mjs → providers-CoJceYkV.mjs} +0 -0
  173. /package/dist/{render-strategy-C8IyLw0O.d.mts → render-strategy-CRwPcG33.d.mts} +0 -0
  174. /package/dist/{render-strategy-rA4C5NUX.d.cts → render-strategy-M8NkD01w.d.cts} +0 -0
  175. /package/dist/{types-B4tvWlDb.d.cts → types-CrwpJrFp.d.mts} +0 -0
  176. /package/dist/{types-BmBABPZb.d.mts → types-DcUAwTQC.d.cts} +0 -0
  177. /package/dist/{use-event-4J5QFFqK.mjs → use-event-B4e6iJDK.mjs} +0 -0
  178. /package/dist/{use-safe-layout-effect-CLjnuJFb.mjs → use-safe-layout-effect-DPn_9-dD.mjs} +0 -0
  179. /package/dist/{utils-C-m3mZWI.mjs → utils-BQJFlkDE.mjs} +0 -0
@@ -0,0 +1,174 @@
1
+ import { t as __export } from "../../chunk-BU8PiJgx.mjs";
2
+ import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-79NSyZp-.mjs";
3
+ import { t as createContext$1 } from "../../create-context-DbhrVE2B.mjs";
4
+ import { n as useEnvironmentContext } from "../../environment-Cc02I6aF.mjs";
5
+ import { i as useLocaleContext } from "../../locale-D4LX0eEq.mjs";
6
+ import "../../providers-CoJceYkV.mjs";
7
+ import { n as sprawlify } from "../../factory-7ydMApfi.mjs";
8
+ import { t as createSplitProps } from "../../create-split-props-BJdRM9I_.mjs";
9
+ import { forwardRef, useId } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import * as pagination from "@sprawlify/primitives/machines/pagination";
12
+ import { anatomy as paginationAnatomy } from "@sprawlify/primitives/machines/pagination";
13
+
14
+ //#region src/components/pagination/use-pagination-context.ts
15
+ const [PaginationProvider, usePaginationContext] = createContext$1({
16
+ name: "PaginationContext",
17
+ hookName: "usePaginationContext",
18
+ providerName: "<PaginationProvider />"
19
+ });
20
+
21
+ //#endregion
22
+ //#region src/components/pagination/pagination-context.tsx
23
+ const PaginationContext = (props) => props.children(usePaginationContext());
24
+
25
+ //#endregion
26
+ //#region src/components/pagination/pagination-ellipsis.tsx
27
+ const splitEllipsisProps = createSplitProps();
28
+ const PaginationEllipsis = forwardRef((props, ref) => {
29
+ const [ellipsisProps, localProps] = splitEllipsisProps(props, ["index"]);
30
+ const mergedProps = mergeProps(usePaginationContext().getEllipsisProps(ellipsisProps), localProps);
31
+ return /* @__PURE__ */ jsx(sprawlify.div, {
32
+ ...mergedProps,
33
+ ref
34
+ });
35
+ });
36
+ PaginationEllipsis.displayName = "PaginationEllipsis";
37
+
38
+ //#endregion
39
+ //#region src/components/pagination/pagination-first-trigger.tsx
40
+ const PaginationFirstTrigger = forwardRef((props, ref) => {
41
+ const mergedProps = mergeProps(usePaginationContext().getFirstTriggerProps(), props);
42
+ return /* @__PURE__ */ jsx(sprawlify.button, {
43
+ ...mergedProps,
44
+ ref
45
+ });
46
+ });
47
+ PaginationFirstTrigger.displayName = "PaginationFirstTrigger";
48
+
49
+ //#endregion
50
+ //#region src/components/pagination/pagination-item.tsx
51
+ const splitItemProps = createSplitProps();
52
+ const PaginationItem = forwardRef((props, ref) => {
53
+ const [itemProps, localProps] = splitItemProps(props, ["value", "type"]);
54
+ const mergedProps = mergeProps(usePaginationContext().getItemProps(itemProps), localProps);
55
+ return /* @__PURE__ */ jsx(sprawlify.button, {
56
+ ...mergedProps,
57
+ ref
58
+ });
59
+ });
60
+ PaginationItem.displayName = "PaginationItem";
61
+
62
+ //#endregion
63
+ //#region src/components/pagination/pagination-last-trigger.tsx
64
+ const PaginationLastTrigger = forwardRef((props, ref) => {
65
+ const mergedProps = mergeProps(usePaginationContext().getLastTriggerProps(), props);
66
+ return /* @__PURE__ */ jsx(sprawlify.button, {
67
+ ...mergedProps,
68
+ ref
69
+ });
70
+ });
71
+ PaginationLastTrigger.displayName = "PaginationLastTrigger";
72
+
73
+ //#endregion
74
+ //#region src/components/pagination/pagination-next-trigger.tsx
75
+ const PaginationNextTrigger = forwardRef((props, ref) => {
76
+ const mergedProps = mergeProps(usePaginationContext().getNextTriggerProps(), props);
77
+ return /* @__PURE__ */ jsx(sprawlify.button, {
78
+ ...mergedProps,
79
+ ref
80
+ });
81
+ });
82
+ PaginationNextTrigger.displayName = "PaginationNextTrigger";
83
+
84
+ //#endregion
85
+ //#region src/components/pagination/pagination-prev-trigger.tsx
86
+ const PaginationPrevTrigger = forwardRef((props, ref) => {
87
+ const mergedProps = mergeProps(usePaginationContext().getPrevTriggerProps(), props);
88
+ return /* @__PURE__ */ jsx(sprawlify.button, {
89
+ ...mergedProps,
90
+ ref
91
+ });
92
+ });
93
+ PaginationPrevTrigger.displayName = "PaginationPrevTrigger";
94
+
95
+ //#endregion
96
+ //#region src/components/pagination/use-pagination.ts
97
+ const usePagination = (props) => {
98
+ const id = useId();
99
+ const { getRootNode } = useEnvironmentContext();
100
+ const { dir } = useLocaleContext();
101
+ const machineProps = {
102
+ id,
103
+ dir,
104
+ getRootNode,
105
+ ...props
106
+ };
107
+ const service = useMachine(pagination.machine, machineProps);
108
+ return pagination.connect(service, normalizeProps);
109
+ };
110
+
111
+ //#endregion
112
+ //#region src/components/pagination/pagination-root.tsx
113
+ const splitRootProps = createSplitProps();
114
+ const PaginationRoot = forwardRef((props, ref) => {
115
+ const [paginationProps, localProps] = splitRootProps(props, [
116
+ "boundaryCount",
117
+ "count",
118
+ "defaultPage",
119
+ "defaultPageSize",
120
+ "getPageUrl",
121
+ "id",
122
+ "ids",
123
+ "onPageChange",
124
+ "onPageSizeChange",
125
+ "page",
126
+ "pageSize",
127
+ "siblingCount",
128
+ "translations",
129
+ "type"
130
+ ]);
131
+ const pagination$1 = usePagination(paginationProps);
132
+ const mergedProps = mergeProps(pagination$1.getRootProps(), localProps);
133
+ return /* @__PURE__ */ jsx(PaginationProvider, {
134
+ value: pagination$1,
135
+ children: /* @__PURE__ */ jsx(sprawlify.nav, {
136
+ ...mergedProps,
137
+ ref
138
+ })
139
+ });
140
+ });
141
+ PaginationRoot.displayName = "PaginationRoot";
142
+
143
+ //#endregion
144
+ //#region src/components/pagination/pagination-root-provider.tsx
145
+ const splitRootProviderProps = createSplitProps();
146
+ const PaginationRootProvider = forwardRef((props, ref) => {
147
+ const [{ value: pagination$1 }, localProps] = splitRootProviderProps(props, ["value"]);
148
+ const mergedProps = mergeProps(pagination$1.getRootProps(), localProps);
149
+ return /* @__PURE__ */ jsx(PaginationProvider, {
150
+ value: pagination$1,
151
+ children: /* @__PURE__ */ jsx(sprawlify.nav, {
152
+ ...mergedProps,
153
+ ref
154
+ })
155
+ });
156
+ });
157
+ PaginationRootProvider.displayName = "PaginationRootProvider";
158
+
159
+ //#endregion
160
+ //#region src/components/pagination/pagination.ts
161
+ var pagination_exports = /* @__PURE__ */ __export({
162
+ Context: () => PaginationContext,
163
+ Ellipsis: () => PaginationEllipsis,
164
+ FirstTrigger: () => PaginationFirstTrigger,
165
+ Item: () => PaginationItem,
166
+ LastTrigger: () => PaginationLastTrigger,
167
+ NextTrigger: () => PaginationNextTrigger,
168
+ PrevTrigger: () => PaginationPrevTrigger,
169
+ Root: () => PaginationRoot,
170
+ RootProvider: () => PaginationRootProvider
171
+ });
172
+
173
+ //#endregion
174
+ export { pagination_exports as Pagination, PaginationContext, PaginationEllipsis, PaginationFirstTrigger, PaginationItem, PaginationLastTrigger, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };
@@ -0,0 +1,193 @@
1
+ const require_chunk = require('../../chunk-BYnRvbsk.cjs');
2
+ const require_core = require('../../core-DCWyxy9D.cjs');
3
+ const require_create_context = require('../../create-context-CQ4U0lLj.cjs');
4
+ const require_environment = require('../../environment-CvilmfQt.cjs');
5
+ const require_locale = require('../../locale-BcnWD1Hf.cjs');
6
+ require('../../providers-BNAArubQ.cjs');
7
+ const require_factory = require('../../factory-C166evrS.cjs');
8
+ const require_create_split_props = require('../../create-split-props-Dp4TWOyM.cjs');
9
+ require('../../use-fieldset-context-CCQLmNLL.cjs');
10
+ require('../../use-safe-layout-effect-C2GgvNT3.cjs');
11
+ const require_field = require('../../field-C-57Gj2E.cjs');
12
+ let react = require("react");
13
+ let react_jsx_runtime = require("react/jsx-runtime");
14
+ let __sprawlify_primitives_machines_password_input = require("@sprawlify/primitives/machines/password-input");
15
+ __sprawlify_primitives_machines_password_input = require_chunk.__toESM(__sprawlify_primitives_machines_password_input);
16
+ let __sprawlify_primitives_core = require("@sprawlify/primitives/core");
17
+
18
+ //#region src/components/password-input/use-password-input-context.ts
19
+ const [PasswordInputProvider, usePasswordInputContext] = require_create_context.createContext({
20
+ name: "PasswordInputContext",
21
+ hookName: "usePasswordInputContext",
22
+ providerName: "<PasswordInputProvider />"
23
+ });
24
+
25
+ //#endregion
26
+ //#region src/components/password-input/password-input-context.tsx
27
+ const PasswordInputContext = (props) => {
28
+ return props.children(usePasswordInputContext());
29
+ };
30
+
31
+ //#endregion
32
+ //#region src/components/password-input/password-input-control.tsx
33
+ const PasswordInputControl = (0, react.forwardRef)((props, ref) => {
34
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getControlProps(), props);
35
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
36
+ ...mergedProps,
37
+ ref
38
+ });
39
+ });
40
+ PasswordInputControl.displayName = "PasswordInputControl";
41
+
42
+ //#endregion
43
+ //#region src/components/password-input/password-input-indicator.tsx
44
+ const PasswordInputIndicator = (0, react.forwardRef)((props, ref) => {
45
+ const passwordInput = usePasswordInputContext();
46
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getIndicatorProps(), props);
47
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.span, {
48
+ ...mergedProps,
49
+ ref,
50
+ children: passwordInput.visible ? props.children : props.fallback
51
+ });
52
+ });
53
+ PasswordInputIndicator.displayName = "PasswordInputIndicator";
54
+
55
+ //#endregion
56
+ //#region src/components/password-input/password-input-input.tsx
57
+ const PasswordInputInput = (0, react.forwardRef)((props, ref) => {
58
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getInputProps(), props);
59
+ const field = require_field.useFieldContext();
60
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.input, {
61
+ "aria-describedby": field?.ariaDescribedby,
62
+ ...mergedProps,
63
+ ref
64
+ });
65
+ });
66
+ PasswordInputInput.displayName = "PasswordInputInput";
67
+
68
+ //#endregion
69
+ //#region src/components/password-input/password-input-label.tsx
70
+ const PasswordInputLabel = (0, react.forwardRef)((props, ref) => {
71
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getLabelProps(), props);
72
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.label, {
73
+ ...mergedProps,
74
+ ref
75
+ });
76
+ });
77
+ PasswordInputLabel.displayName = "PasswordInputLabel";
78
+
79
+ //#endregion
80
+ //#region src/components/password-input/use-password-input.ts
81
+ const usePasswordInput = (props) => {
82
+ const id = (0, react.useId)();
83
+ const { getRootNode } = require_environment.useEnvironmentContext();
84
+ const { dir } = require_locale.useLocaleContext();
85
+ const field = require_field.useFieldContext();
86
+ const machineProps = {
87
+ id,
88
+ ids: { input: field?.ids.control },
89
+ disabled: field?.disabled,
90
+ readOnly: field?.readOnly,
91
+ required: field?.required,
92
+ invalid: field?.invalid,
93
+ dir,
94
+ getRootNode,
95
+ ...props
96
+ };
97
+ const service = require_core.useMachine(__sprawlify_primitives_machines_password_input.machine, machineProps);
98
+ return __sprawlify_primitives_machines_password_input.connect(service, require_core.normalizeProps);
99
+ };
100
+
101
+ //#endregion
102
+ //#region src/components/password-input/password-input-root.tsx
103
+ const splitRootProps = require_create_split_props.createSplitProps();
104
+ const PasswordInputRoot = (0, react.forwardRef)((props, ref) => {
105
+ const [usePasswordInputProps, localProps] = splitRootProps(props, [
106
+ "autoComplete",
107
+ "defaultVisible",
108
+ "disabled",
109
+ "id",
110
+ "ids",
111
+ "ignorePasswordManagers",
112
+ "invalid",
113
+ "name",
114
+ "onVisibilityChange",
115
+ "readOnly",
116
+ "required",
117
+ "translations",
118
+ "visible"
119
+ ]);
120
+ const passwordInput = usePasswordInput(usePasswordInputProps);
121
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getRootProps(), localProps);
122
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PasswordInputProvider, {
123
+ value: passwordInput,
124
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
125
+ ...mergedProps,
126
+ ref
127
+ })
128
+ });
129
+ });
130
+ PasswordInputRoot.displayName = "PasswordInputRoot";
131
+
132
+ //#endregion
133
+ //#region src/components/password-input/password-input-root-provider.tsx
134
+ const PasswordInputRootProvider = (0, react.forwardRef)((props, ref) => {
135
+ const { value: passwordInput, ...localProps } = props;
136
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getRootProps(), localProps);
137
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PasswordInputProvider, {
138
+ value: passwordInput,
139
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
140
+ ...mergedProps,
141
+ ref
142
+ })
143
+ });
144
+ });
145
+ PasswordInputRootProvider.displayName = "PasswordInputRootProvider";
146
+
147
+ //#endregion
148
+ //#region src/components/password-input/password-input-visibility-trigger.tsx
149
+ const PasswordInputVisibilityTrigger = (0, react.forwardRef)((props, ref) => {
150
+ const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getVisibilityTriggerProps(), props);
151
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.button, {
152
+ ...mergedProps,
153
+ ref
154
+ });
155
+ });
156
+ PasswordInputVisibilityTrigger.displayName = "PasswordInputVisibilityTrigger";
157
+
158
+ //#endregion
159
+ //#region src/components/password-input/password-input.ts
160
+ var password_input_exports = /* @__PURE__ */ require_chunk.__export({
161
+ Context: () => PasswordInputContext,
162
+ Control: () => PasswordInputControl,
163
+ Indicator: () => PasswordInputIndicator,
164
+ Input: () => PasswordInputInput,
165
+ Label: () => PasswordInputLabel,
166
+ Root: () => PasswordInputRoot,
167
+ RootProvider: () => PasswordInputRootProvider,
168
+ VisibilityTrigger: () => PasswordInputVisibilityTrigger
169
+ });
170
+
171
+ //#endregion
172
+ Object.defineProperty(exports, 'PasswordInput', {
173
+ enumerable: true,
174
+ get: function () {
175
+ return password_input_exports;
176
+ }
177
+ });
178
+ exports.PasswordInputContext = PasswordInputContext;
179
+ exports.PasswordInputControl = PasswordInputControl;
180
+ exports.PasswordInputIndicator = PasswordInputIndicator;
181
+ exports.PasswordInputInput = PasswordInputInput;
182
+ exports.PasswordInputLabel = PasswordInputLabel;
183
+ exports.PasswordInputRoot = PasswordInputRoot;
184
+ exports.PasswordInputRootProvider = PasswordInputRootProvider;
185
+ exports.PasswordInputVisibilityTrigger = PasswordInputVisibilityTrigger;
186
+ Object.defineProperty(exports, 'passwordInputAnatomy', {
187
+ enumerable: true,
188
+ get: function () {
189
+ return __sprawlify_primitives_machines_password_input.anatomy;
190
+ }
191
+ });
192
+ exports.usePasswordInput = usePasswordInput;
193
+ exports.usePasswordInputContext = usePasswordInputContext;
@@ -0,0 +1,66 @@
1
+ import { t as PropTypes } from "../../normalize-props-Dw0EepzR.cjs";
2
+ import { r as Optional, t as Assign } from "../../types-DcUAwTQC.cjs";
3
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-fcFI3pbG.cjs";
4
+ import * as react43 from "react";
5
+ import { ReactNode } from "react";
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 passwordInput.Api<PropTypes> {}
12
+ declare const usePasswordInput: (props?: UsePasswordInputProps) => UsePasswordInputReturn;
13
+ //#endregion
14
+ //#region src/components/password-input/password-input-context.d.ts
15
+ interface PasswordInputContextProps {
16
+ children: (context: UsePasswordInputReturn) => ReactNode;
17
+ }
18
+ declare const PasswordInputContext: (props: PasswordInputContextProps) => ReactNode;
19
+ //#endregion
20
+ //#region src/components/password-input/password-input-control.d.ts
21
+ interface PasswordInputControlBaseProps extends PolymorphicProps {}
22
+ interface PasswordInputControlProps extends HTMLProps<"div">, PasswordInputControlBaseProps {}
23
+ declare const PasswordInputControl: react43.ForwardRefExoticComponent<PasswordInputControlProps & react43.RefAttributes<HTMLDivElement>>;
24
+ //#endregion
25
+ //#region src/components/password-input/password-input-indicator.d.ts
26
+ interface PasswordInputIndicatorBaseProps extends PolymorphicProps {
27
+ fallback?: React.ReactNode;
28
+ }
29
+ interface PasswordInputIndicatorProps extends HTMLProps<"span">, PasswordInputIndicatorBaseProps {}
30
+ declare const PasswordInputIndicator: react43.ForwardRefExoticComponent<PasswordInputIndicatorProps & react43.RefAttributes<HTMLSpanElement>>;
31
+ //#endregion
32
+ //#region src/components/password-input/password-input-input.d.ts
33
+ interface PasswordInputInputBaseProps extends PolymorphicProps {}
34
+ interface PasswordInputInputProps extends HTMLProps<"input">, PasswordInputInputBaseProps {}
35
+ declare const PasswordInputInput: react43.ForwardRefExoticComponent<PasswordInputInputProps & react43.RefAttributes<HTMLInputElement>>;
36
+ //#endregion
37
+ //#region src/components/password-input/password-input-label.d.ts
38
+ interface PasswordInputLabelBaseProps extends PolymorphicProps {}
39
+ interface PasswordInputLabelProps extends HTMLProps<"label">, PasswordInputLabelBaseProps {}
40
+ declare const PasswordInputLabel: react43.ForwardRefExoticComponent<PasswordInputLabelProps & react43.RefAttributes<HTMLLabelElement>>;
41
+ //#endregion
42
+ //#region src/components/password-input/password-input-root.d.ts
43
+ interface PasswordInputRootBaseProps extends UsePasswordInputProps, PolymorphicProps {}
44
+ interface PasswordInputRootProps extends Assign<HTMLProps<"div">, PasswordInputRootBaseProps> {}
45
+ declare const PasswordInputRoot: react43.ForwardRefExoticComponent<PasswordInputRootProps & react43.RefAttributes<HTMLDivElement>>;
46
+ //#endregion
47
+ //#region src/components/password-input/password-input-root-provider.d.ts
48
+ interface RootProviderProps {
49
+ value: UsePasswordInputReturn;
50
+ }
51
+ interface PasswordInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
52
+ interface PasswordInputRootProviderProps extends HTMLProps<"div">, PasswordInputRootProviderBaseProps {}
53
+ declare const PasswordInputRootProvider: react43.ForwardRefExoticComponent<PasswordInputRootProviderProps & react43.RefAttributes<HTMLDivElement>>;
54
+ //#endregion
55
+ //#region src/components/password-input/password-input-visibility-trigger.d.ts
56
+ interface PasswordInputVisibilityTriggerBaseProps extends PolymorphicProps {}
57
+ interface PasswordInputVisibilityTriggerProps extends HTMLProps<"button">, PasswordInputVisibilityTriggerBaseProps {}
58
+ declare const PasswordInputVisibilityTrigger: react43.ForwardRefExoticComponent<PasswordInputVisibilityTriggerProps & react43.RefAttributes<HTMLButtonElement>>;
59
+ //#endregion
60
+ //#region src/components/password-input/use-password-input-context.d.ts
61
+ interface UsePasswordInputContext extends UsePasswordInputReturn {}
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,66 @@
1
+ import { r as PropTypes } from "../../index-BLd57Y0z.mjs";
2
+ import { r as Optional, t as Assign } from "../../types-CrwpJrFp.mjs";
3
+ import { r as PolymorphicProps, t as HTMLProps } from "../../factory-DaVlp4Ba.mjs";
4
+ import * as react302 from "react";
5
+ import { ReactNode } from "react";
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 passwordInput.Api<PropTypes> {}
12
+ declare const usePasswordInput: (props?: UsePasswordInputProps) => UsePasswordInputReturn;
13
+ //#endregion
14
+ //#region src/components/password-input/password-input-context.d.ts
15
+ interface PasswordInputContextProps {
16
+ children: (context: UsePasswordInputReturn) => ReactNode;
17
+ }
18
+ declare const PasswordInputContext: (props: PasswordInputContextProps) => ReactNode;
19
+ //#endregion
20
+ //#region src/components/password-input/password-input-control.d.ts
21
+ interface PasswordInputControlBaseProps extends PolymorphicProps {}
22
+ interface PasswordInputControlProps extends HTMLProps<"div">, PasswordInputControlBaseProps {}
23
+ declare const PasswordInputControl: react302.ForwardRefExoticComponent<PasswordInputControlProps & react302.RefAttributes<HTMLDivElement>>;
24
+ //#endregion
25
+ //#region src/components/password-input/password-input-indicator.d.ts
26
+ interface PasswordInputIndicatorBaseProps extends PolymorphicProps {
27
+ fallback?: React.ReactNode;
28
+ }
29
+ interface PasswordInputIndicatorProps extends HTMLProps<"span">, PasswordInputIndicatorBaseProps {}
30
+ declare const PasswordInputIndicator: react302.ForwardRefExoticComponent<PasswordInputIndicatorProps & react302.RefAttributes<HTMLSpanElement>>;
31
+ //#endregion
32
+ //#region src/components/password-input/password-input-input.d.ts
33
+ interface PasswordInputInputBaseProps extends PolymorphicProps {}
34
+ interface PasswordInputInputProps extends HTMLProps<"input">, PasswordInputInputBaseProps {}
35
+ declare const PasswordInputInput: react302.ForwardRefExoticComponent<PasswordInputInputProps & react302.RefAttributes<HTMLInputElement>>;
36
+ //#endregion
37
+ //#region src/components/password-input/password-input-label.d.ts
38
+ interface PasswordInputLabelBaseProps extends PolymorphicProps {}
39
+ interface PasswordInputLabelProps extends HTMLProps<"label">, PasswordInputLabelBaseProps {}
40
+ declare const PasswordInputLabel: react302.ForwardRefExoticComponent<PasswordInputLabelProps & react302.RefAttributes<HTMLLabelElement>>;
41
+ //#endregion
42
+ //#region src/components/password-input/password-input-root.d.ts
43
+ interface PasswordInputRootBaseProps extends UsePasswordInputProps, PolymorphicProps {}
44
+ interface PasswordInputRootProps extends Assign<HTMLProps<"div">, PasswordInputRootBaseProps> {}
45
+ declare const PasswordInputRoot: react302.ForwardRefExoticComponent<PasswordInputRootProps & react302.RefAttributes<HTMLDivElement>>;
46
+ //#endregion
47
+ //#region src/components/password-input/password-input-root-provider.d.ts
48
+ interface RootProviderProps {
49
+ value: UsePasswordInputReturn;
50
+ }
51
+ interface PasswordInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
52
+ interface PasswordInputRootProviderProps extends HTMLProps<"div">, PasswordInputRootProviderBaseProps {}
53
+ declare const PasswordInputRootProvider: react302.ForwardRefExoticComponent<PasswordInputRootProviderProps & react302.RefAttributes<HTMLDivElement>>;
54
+ //#endregion
55
+ //#region src/components/password-input/password-input-visibility-trigger.d.ts
56
+ interface PasswordInputVisibilityTriggerBaseProps extends PolymorphicProps {}
57
+ interface PasswordInputVisibilityTriggerProps extends HTMLProps<"button">, PasswordInputVisibilityTriggerBaseProps {}
58
+ declare const PasswordInputVisibilityTrigger: react302.ForwardRefExoticComponent<PasswordInputVisibilityTriggerProps & react302.RefAttributes<HTMLButtonElement>>;
59
+ //#endregion
60
+ //#region src/components/password-input/use-password-input-context.d.ts
61
+ interface UsePasswordInputContext extends UsePasswordInputReturn {}
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,171 @@
1
+ import { t as __export } from "../../chunk-BU8PiJgx.mjs";
2
+ import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-79NSyZp-.mjs";
3
+ import { t as createContext$1 } from "../../create-context-DbhrVE2B.mjs";
4
+ import { n as useEnvironmentContext } from "../../environment-Cc02I6aF.mjs";
5
+ import { i as useLocaleContext } from "../../locale-D4LX0eEq.mjs";
6
+ import "../../providers-CoJceYkV.mjs";
7
+ import { n as sprawlify } from "../../factory-7ydMApfi.mjs";
8
+ import { t as createSplitProps } from "../../create-split-props-BJdRM9I_.mjs";
9
+ import "../../use-fieldset-context-6GRSrrlt.mjs";
10
+ import "../../use-safe-layout-effect-DPn_9-dD.mjs";
11
+ import { m as useFieldContext } from "../../field-BXY6su53.mjs";
12
+ import { forwardRef, useId } from "react";
13
+ import { jsx } from "react/jsx-runtime";
14
+ import * as passwordInput from "@sprawlify/primitives/machines/password-input";
15
+ import { anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
16
+
17
+ //#region src/components/password-input/use-password-input-context.ts
18
+ const [PasswordInputProvider, usePasswordInputContext] = createContext$1({
19
+ name: "PasswordInputContext",
20
+ hookName: "usePasswordInputContext",
21
+ providerName: "<PasswordInputProvider />"
22
+ });
23
+
24
+ //#endregion
25
+ //#region src/components/password-input/password-input-context.tsx
26
+ const PasswordInputContext = (props) => {
27
+ return props.children(usePasswordInputContext());
28
+ };
29
+
30
+ //#endregion
31
+ //#region src/components/password-input/password-input-control.tsx
32
+ const PasswordInputControl = forwardRef((props, ref) => {
33
+ const mergedProps = mergeProps(usePasswordInputContext().getControlProps(), props);
34
+ return /* @__PURE__ */ jsx(sprawlify.div, {
35
+ ...mergedProps,
36
+ ref
37
+ });
38
+ });
39
+ PasswordInputControl.displayName = "PasswordInputControl";
40
+
41
+ //#endregion
42
+ //#region src/components/password-input/password-input-indicator.tsx
43
+ const PasswordInputIndicator = forwardRef((props, ref) => {
44
+ const passwordInput$1 = usePasswordInputContext();
45
+ const mergedProps = mergeProps(passwordInput$1.getIndicatorProps(), props);
46
+ return /* @__PURE__ */ jsx(sprawlify.span, {
47
+ ...mergedProps,
48
+ ref,
49
+ children: passwordInput$1.visible ? props.children : props.fallback
50
+ });
51
+ });
52
+ PasswordInputIndicator.displayName = "PasswordInputIndicator";
53
+
54
+ //#endregion
55
+ //#region src/components/password-input/password-input-input.tsx
56
+ const PasswordInputInput = forwardRef((props, ref) => {
57
+ const mergedProps = mergeProps(usePasswordInputContext().getInputProps(), props);
58
+ const field = useFieldContext();
59
+ return /* @__PURE__ */ jsx(sprawlify.input, {
60
+ "aria-describedby": field?.ariaDescribedby,
61
+ ...mergedProps,
62
+ ref
63
+ });
64
+ });
65
+ PasswordInputInput.displayName = "PasswordInputInput";
66
+
67
+ //#endregion
68
+ //#region src/components/password-input/password-input-label.tsx
69
+ const PasswordInputLabel = forwardRef((props, ref) => {
70
+ const mergedProps = mergeProps(usePasswordInputContext().getLabelProps(), props);
71
+ return /* @__PURE__ */ jsx(sprawlify.label, {
72
+ ...mergedProps,
73
+ ref
74
+ });
75
+ });
76
+ PasswordInputLabel.displayName = "PasswordInputLabel";
77
+
78
+ //#endregion
79
+ //#region src/components/password-input/use-password-input.ts
80
+ const usePasswordInput = (props) => {
81
+ const id = useId();
82
+ const { getRootNode } = useEnvironmentContext();
83
+ const { dir } = useLocaleContext();
84
+ const field = useFieldContext();
85
+ const machineProps = {
86
+ id,
87
+ ids: { input: field?.ids.control },
88
+ disabled: field?.disabled,
89
+ readOnly: field?.readOnly,
90
+ required: field?.required,
91
+ invalid: field?.invalid,
92
+ dir,
93
+ getRootNode,
94
+ ...props
95
+ };
96
+ const service = useMachine(passwordInput.machine, machineProps);
97
+ return passwordInput.connect(service, normalizeProps);
98
+ };
99
+
100
+ //#endregion
101
+ //#region src/components/password-input/password-input-root.tsx
102
+ const splitRootProps = createSplitProps();
103
+ const PasswordInputRoot = forwardRef((props, ref) => {
104
+ const [usePasswordInputProps, localProps] = splitRootProps(props, [
105
+ "autoComplete",
106
+ "defaultVisible",
107
+ "disabled",
108
+ "id",
109
+ "ids",
110
+ "ignorePasswordManagers",
111
+ "invalid",
112
+ "name",
113
+ "onVisibilityChange",
114
+ "readOnly",
115
+ "required",
116
+ "translations",
117
+ "visible"
118
+ ]);
119
+ const passwordInput$1 = usePasswordInput(usePasswordInputProps);
120
+ const mergedProps = mergeProps(passwordInput$1.getRootProps(), localProps);
121
+ return /* @__PURE__ */ jsx(PasswordInputProvider, {
122
+ value: passwordInput$1,
123
+ children: /* @__PURE__ */ jsx(sprawlify.div, {
124
+ ...mergedProps,
125
+ ref
126
+ })
127
+ });
128
+ });
129
+ PasswordInputRoot.displayName = "PasswordInputRoot";
130
+
131
+ //#endregion
132
+ //#region src/components/password-input/password-input-root-provider.tsx
133
+ const PasswordInputRootProvider = forwardRef((props, ref) => {
134
+ const { value: passwordInput$1, ...localProps } = props;
135
+ const mergedProps = mergeProps(passwordInput$1.getRootProps(), localProps);
136
+ return /* @__PURE__ */ jsx(PasswordInputProvider, {
137
+ value: passwordInput$1,
138
+ children: /* @__PURE__ */ jsx(sprawlify.div, {
139
+ ...mergedProps,
140
+ ref
141
+ })
142
+ });
143
+ });
144
+ PasswordInputRootProvider.displayName = "PasswordInputRootProvider";
145
+
146
+ //#endregion
147
+ //#region src/components/password-input/password-input-visibility-trigger.tsx
148
+ const PasswordInputVisibilityTrigger = forwardRef((props, ref) => {
149
+ const mergedProps = mergeProps(usePasswordInputContext().getVisibilityTriggerProps(), props);
150
+ return /* @__PURE__ */ jsx(sprawlify.button, {
151
+ ...mergedProps,
152
+ ref
153
+ });
154
+ });
155
+ PasswordInputVisibilityTrigger.displayName = "PasswordInputVisibilityTrigger";
156
+
157
+ //#endregion
158
+ //#region src/components/password-input/password-input.ts
159
+ var password_input_exports = /* @__PURE__ */ __export({
160
+ Context: () => PasswordInputContext,
161
+ Control: () => PasswordInputControl,
162
+ Indicator: () => PasswordInputIndicator,
163
+ Input: () => PasswordInputInput,
164
+ Label: () => PasswordInputLabel,
165
+ Root: () => PasswordInputRoot,
166
+ RootProvider: () => PasswordInputRootProvider,
167
+ VisibilityTrigger: () => PasswordInputVisibilityTrigger
168
+ });
169
+
170
+ //#endregion
171
+ export { password_input_exports as PasswordInput, PasswordInputContext, PasswordInputControl, PasswordInputIndicator, PasswordInputInput, PasswordInputLabel, PasswordInputRoot, PasswordInputRootProvider, PasswordInputVisibilityTrigger, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };