@central-ui/react 0.0.0-stage → 0.1.0

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 (292) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -2
  3. package/dist/components/accordion/index.d.ts +73 -0
  4. package/dist/components/accordion/index.d.ts.map +1 -0
  5. package/dist/components/accordion/index.js +92 -0
  6. package/dist/components/accordion/index.js.map +1 -0
  7. package/dist/components/autocomplete/index.d.ts +365 -0
  8. package/dist/components/autocomplete/index.d.ts.map +1 -0
  9. package/dist/components/autocomplete/index.js +369 -0
  10. package/dist/components/autocomplete/index.js.map +1 -0
  11. package/dist/components/avatar/index.d.ts +48 -0
  12. package/dist/components/avatar/index.d.ts.map +1 -0
  13. package/dist/components/avatar/index.js +60 -0
  14. package/dist/components/avatar/index.js.map +1 -0
  15. package/dist/components/badge/index.d.ts +29 -0
  16. package/dist/components/badge/index.d.ts.map +1 -0
  17. package/dist/components/badge/index.js +36 -0
  18. package/dist/components/badge/index.js.map +1 -0
  19. package/dist/components/banner/index.d.ts +71 -0
  20. package/dist/components/banner/index.d.ts.map +1 -0
  21. package/dist/components/banner/index.js +119 -0
  22. package/dist/components/banner/index.js.map +1 -0
  23. package/dist/components/breadcrumb/index.d.ts +31 -0
  24. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  25. package/dist/components/breadcrumb/index.js +42 -0
  26. package/dist/components/breadcrumb/index.js.map +1 -0
  27. package/dist/components/button/index.d.ts +48 -0
  28. package/dist/components/button/index.d.ts.map +1 -0
  29. package/dist/components/button/index.js +60 -0
  30. package/dist/components/button/index.js.map +1 -0
  31. package/dist/components/card/index.d.ts +34 -0
  32. package/dist/components/card/index.d.ts.map +1 -0
  33. package/dist/components/card/index.js +45 -0
  34. package/dist/components/card/index.js.map +1 -0
  35. package/dist/components/checkbox/index.d.ts +66 -0
  36. package/dist/components/checkbox/index.d.ts.map +1 -0
  37. package/dist/components/checkbox/index.js +146 -0
  38. package/dist/components/checkbox/index.js.map +1 -0
  39. package/dist/components/chip/index.d.ts +26 -0
  40. package/dist/components/chip/index.d.ts.map +1 -0
  41. package/dist/components/chip/index.js +40 -0
  42. package/dist/components/chip/index.js.map +1 -0
  43. package/dist/components/combobox/index.d.ts +427 -0
  44. package/dist/components/combobox/index.d.ts.map +1 -0
  45. package/dist/components/combobox/index.js +416 -0
  46. package/dist/components/combobox/index.js.map +1 -0
  47. package/dist/components/datepicker/index.d.ts +297 -0
  48. package/dist/components/datepicker/index.d.ts.map +1 -0
  49. package/dist/components/datepicker/index.js +507 -0
  50. package/dist/components/datepicker/index.js.map +1 -0
  51. package/dist/components/dialog/index.d.ts +88 -0
  52. package/dist/components/dialog/index.d.ts.map +1 -0
  53. package/dist/components/dialog/index.js +102 -0
  54. package/dist/components/dialog/index.js.map +1 -0
  55. package/dist/components/divider/index.d.ts +21 -0
  56. package/dist/components/divider/index.d.ts.map +1 -0
  57. package/dist/components/divider/index.js +24 -0
  58. package/dist/components/divider/index.js.map +1 -0
  59. package/dist/components/drawer/index.d.ts +99 -0
  60. package/dist/components/drawer/index.d.ts.map +1 -0
  61. package/dist/components/drawer/index.js +137 -0
  62. package/dist/components/drawer/index.js.map +1 -0
  63. package/dist/components/empty/index.d.ts +40 -0
  64. package/dist/components/empty/index.d.ts.map +1 -0
  65. package/dist/components/empty/index.js +61 -0
  66. package/dist/components/empty/index.js.map +1 -0
  67. package/dist/components/fileupload/index.d.ts +107 -0
  68. package/dist/components/fileupload/index.d.ts.map +1 -0
  69. package/dist/components/fileupload/index.js +185 -0
  70. package/dist/components/fileupload/index.js.map +1 -0
  71. package/dist/components/form/index.d.ts +34 -0
  72. package/dist/components/form/index.d.ts.map +1 -0
  73. package/dist/components/form/index.js +35 -0
  74. package/dist/components/form/index.js.map +1 -0
  75. package/dist/components/input/index.d.ts +85 -0
  76. package/dist/components/input/index.d.ts.map +1 -0
  77. package/dist/components/input/index.js +249 -0
  78. package/dist/components/input/index.js.map +1 -0
  79. package/dist/components/menu/index.d.ts +115 -0
  80. package/dist/components/menu/index.d.ts.map +1 -0
  81. package/dist/components/menu/index.js +188 -0
  82. package/dist/components/menu/index.js.map +1 -0
  83. package/dist/components/metric/index.d.ts +24 -0
  84. package/dist/components/metric/index.d.ts.map +1 -0
  85. package/dist/components/metric/index.js +26 -0
  86. package/dist/components/metric/index.js.map +1 -0
  87. package/dist/components/numberinput/index.d.ts +105 -0
  88. package/dist/components/numberinput/index.d.ts.map +1 -0
  89. package/dist/components/numberinput/index.js +240 -0
  90. package/dist/components/numberinput/index.js.map +1 -0
  91. package/dist/components/otpinput/index.d.ts +63 -0
  92. package/dist/components/otpinput/index.d.ts.map +1 -0
  93. package/dist/components/otpinput/index.js +133 -0
  94. package/dist/components/otpinput/index.js.map +1 -0
  95. package/dist/components/page/index.d.ts +54 -0
  96. package/dist/components/page/index.d.ts.map +1 -0
  97. package/dist/components/page/index.js +100 -0
  98. package/dist/components/page/index.js.map +1 -0
  99. package/dist/components/passwordinput/index.d.ts +88 -0
  100. package/dist/components/passwordinput/index.d.ts.map +1 -0
  101. package/dist/components/passwordinput/index.js +251 -0
  102. package/dist/components/passwordinput/index.js.map +1 -0
  103. package/dist/components/popover/index.d.ts +67 -0
  104. package/dist/components/popover/index.d.ts.map +1 -0
  105. package/dist/components/popover/index.js +76 -0
  106. package/dist/components/popover/index.js.map +1 -0
  107. package/dist/components/radio/index.d.ts +90 -0
  108. package/dist/components/radio/index.d.ts.map +1 -0
  109. package/dist/components/radio/index.js +232 -0
  110. package/dist/components/radio/index.js.map +1 -0
  111. package/dist/components/ratinginput/index.d.ts +59 -0
  112. package/dist/components/ratinginput/index.d.ts.map +1 -0
  113. package/dist/components/ratinginput/index.js +88 -0
  114. package/dist/components/ratinginput/index.js.map +1 -0
  115. package/dist/components/select/index.d.ts +205 -0
  116. package/dist/components/select/index.d.ts.map +1 -0
  117. package/dist/components/select/index.js +234 -0
  118. package/dist/components/select/index.js.map +1 -0
  119. package/dist/components/skeleton/index.d.ts +19 -0
  120. package/dist/components/skeleton/index.d.ts.map +1 -0
  121. package/dist/components/skeleton/index.js +20 -0
  122. package/dist/components/skeleton/index.js.map +1 -0
  123. package/dist/components/slider/index.d.ts +72 -0
  124. package/dist/components/slider/index.d.ts.map +1 -0
  125. package/dist/components/slider/index.js +159 -0
  126. package/dist/components/slider/index.js.map +1 -0
  127. package/dist/components/spinner/index.d.ts +14 -0
  128. package/dist/components/spinner/index.d.ts.map +1 -0
  129. package/dist/components/spinner/index.js +15 -0
  130. package/dist/components/spinner/index.js.map +1 -0
  131. package/dist/components/splitter/index.d.ts +49 -0
  132. package/dist/components/splitter/index.d.ts.map +1 -0
  133. package/dist/components/splitter/index.js +67 -0
  134. package/dist/components/splitter/index.js.map +1 -0
  135. package/dist/components/stepper/index.d.ts +82 -0
  136. package/dist/components/stepper/index.d.ts.map +1 -0
  137. package/dist/components/stepper/index.js +100 -0
  138. package/dist/components/stepper/index.js.map +1 -0
  139. package/dist/components/switch/index.d.ts +57 -0
  140. package/dist/components/switch/index.d.ts.map +1 -0
  141. package/dist/components/switch/index.js +101 -0
  142. package/dist/components/switch/index.js.map +1 -0
  143. package/dist/components/table/index.d.ts +110 -0
  144. package/dist/components/table/index.d.ts.map +1 -0
  145. package/dist/components/table/index.js +211 -0
  146. package/dist/components/table/index.js.map +1 -0
  147. package/dist/components/tabs/index.d.ts +67 -0
  148. package/dist/components/tabs/index.d.ts.map +1 -0
  149. package/dist/components/tabs/index.js +78 -0
  150. package/dist/components/tabs/index.js.map +1 -0
  151. package/dist/components/textarea/index.d.ts +72 -0
  152. package/dist/components/textarea/index.d.ts.map +1 -0
  153. package/dist/components/textarea/index.js +205 -0
  154. package/dist/components/textarea/index.js.map +1 -0
  155. package/dist/components/textlink/index.d.ts +39 -0
  156. package/dist/components/textlink/index.d.ts.map +1 -0
  157. package/dist/components/textlink/index.js +42 -0
  158. package/dist/components/textlink/index.js.map +1 -0
  159. package/dist/components/toast/index.d.ts +111 -0
  160. package/dist/components/toast/index.d.ts.map +1 -0
  161. package/dist/components/toast/index.js +205 -0
  162. package/dist/components/toast/index.js.map +1 -0
  163. package/dist/components/toggle/index.d.ts +41 -0
  164. package/dist/components/toggle/index.d.ts.map +1 -0
  165. package/dist/components/toggle/index.js +78 -0
  166. package/dist/components/toggle/index.js.map +1 -0
  167. package/dist/components/tooltip/index.d.ts +44 -0
  168. package/dist/components/tooltip/index.d.ts.map +1 -0
  169. package/dist/components/tooltip/index.js +51 -0
  170. package/dist/components/tooltip/index.js.map +1 -0
  171. package/dist/index.d.ts +50 -0
  172. package/dist/index.d.ts.map +1 -0
  173. package/dist/index.js +46 -0
  174. package/dist/index.js.map +1 -0
  175. package/dist/types/Style.d.ts +14 -0
  176. package/dist/types/Style.d.ts.map +1 -0
  177. package/dist/types/Style.js +2 -0
  178. package/dist/types/Style.js.map +1 -0
  179. package/dist/types/Tone.d.ts +4 -0
  180. package/dist/types/Tone.d.ts.map +1 -0
  181. package/dist/types/Tone.js +2 -0
  182. package/dist/types/Tone.js.map +1 -0
  183. package/dist/utils/ArkStateToDataAttributes.d.ts +4 -0
  184. package/dist/utils/ArkStateToDataAttributes.d.ts.map +1 -0
  185. package/dist/utils/ArkStateToDataAttributes.js +9 -0
  186. package/dist/utils/ArkStateToDataAttributes.js.map +1 -0
  187. package/dist/utils/Tone.d.ts +3 -0
  188. package/dist/utils/Tone.d.ts.map +1 -0
  189. package/dist/utils/Tone.js +7 -0
  190. package/dist/utils/Tone.js.map +1 -0
  191. package/dist/utils/useForwardClickToInput.d.ts +4 -0
  192. package/dist/utils/useForwardClickToInput.d.ts.map +1 -0
  193. package/dist/utils/useForwardClickToInput.js +27 -0
  194. package/dist/utils/useForwardClickToInput.js.map +1 -0
  195. package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts +198 -0
  196. package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts.map +1 -0
  197. package/dist/utils/virtualization/useVirtualizedAutocomplete.js +180 -0
  198. package/dist/utils/virtualization/useVirtualizedAutocomplete.js.map +1 -0
  199. package/dist/utils/virtualization/useVirtualizedCombobox.d.ts +200 -0
  200. package/dist/utils/virtualization/useVirtualizedCombobox.d.ts.map +1 -0
  201. package/dist/utils/virtualization/useVirtualizedCombobox.js +174 -0
  202. package/dist/utils/virtualization/useVirtualizedCombobox.js.map +1 -0
  203. package/dist/utils/virtualization/useVirtualizedTable.d.ts +169 -0
  204. package/dist/utils/virtualization/useVirtualizedTable.d.ts.map +1 -0
  205. package/dist/utils/virtualization/useVirtualizedTable.js +127 -0
  206. package/dist/utils/virtualization/useVirtualizedTable.js.map +1 -0
  207. package/package.json +64 -4
  208. package/src/presets/shopify-polaris/shopify-polaris-accordion.css +28 -0
  209. package/src/presets/shopify-polaris/shopify-polaris-autocomplete.css +155 -0
  210. package/src/presets/shopify-polaris/shopify-polaris-avatar.css +47 -0
  211. package/src/presets/shopify-polaris/shopify-polaris-badge.css +27 -0
  212. package/src/presets/shopify-polaris/shopify-polaris-banner.css +111 -0
  213. package/src/presets/shopify-polaris/shopify-polaris-breadcrumb.css +16 -0
  214. package/src/presets/shopify-polaris/shopify-polaris-button.css +79 -0
  215. package/src/presets/shopify-polaris/shopify-polaris-card.css +28 -0
  216. package/src/presets/shopify-polaris/shopify-polaris-checkbox.css +52 -0
  217. package/src/presets/shopify-polaris/shopify-polaris-chip.css +16 -0
  218. package/src/presets/shopify-polaris/shopify-polaris-combobox.css +179 -0
  219. package/src/presets/shopify-polaris/shopify-polaris-datepicker.css +183 -0
  220. package/src/presets/shopify-polaris/shopify-polaris-dialog.css +40 -0
  221. package/src/presets/shopify-polaris/shopify-polaris-divider.css +12 -0
  222. package/src/presets/shopify-polaris/shopify-polaris-drawer.css +40 -0
  223. package/src/presets/shopify-polaris/shopify-polaris-empty.css +32 -0
  224. package/src/presets/shopify-polaris/shopify-polaris-fileupload.css +78 -0
  225. package/src/presets/shopify-polaris/shopify-polaris-form.css +8 -0
  226. package/src/presets/shopify-polaris/shopify-polaris-input.css +72 -0
  227. package/src/presets/shopify-polaris/shopify-polaris-menu.css +112 -0
  228. package/src/presets/shopify-polaris/shopify-polaris-metric.css +16 -0
  229. package/src/presets/shopify-polaris/shopify-polaris-numberinput.css +88 -0
  230. package/src/presets/shopify-polaris/shopify-polaris-otpinput.css +42 -0
  231. package/src/presets/shopify-polaris/shopify-polaris-page.css +69 -0
  232. package/src/presets/shopify-polaris/shopify-polaris-passwordinput.css +76 -0
  233. package/src/presets/shopify-polaris/shopify-polaris-popover.css +47 -0
  234. package/src/presets/shopify-polaris/shopify-polaris-radio.css +54 -0
  235. package/src/presets/shopify-polaris/shopify-polaris-ratinginput.css +42 -0
  236. package/src/presets/shopify-polaris/shopify-polaris-select.css +119 -0
  237. package/src/presets/shopify-polaris/shopify-polaris-skeleton.css +8 -0
  238. package/src/presets/shopify-polaris/shopify-polaris-slider.css +86 -0
  239. package/src/presets/shopify-polaris/shopify-polaris-spinner.css +16 -0
  240. package/src/presets/shopify-polaris/shopify-polaris-splitter.css +34 -0
  241. package/src/presets/shopify-polaris/shopify-polaris-stepper.css +55 -0
  242. package/src/presets/shopify-polaris/shopify-polaris-switch.css +38 -0
  243. package/src/presets/shopify-polaris/shopify-polaris-table.css +72 -0
  244. package/src/presets/shopify-polaris/shopify-polaris-tabs.css +33 -0
  245. package/src/presets/shopify-polaris/shopify-polaris-textarea.css +61 -0
  246. package/src/presets/shopify-polaris/shopify-polaris-textlink.css +8 -0
  247. package/src/presets/shopify-polaris/shopify-polaris-toggle.css +52 -0
  248. package/src/presets/shopify-polaris/shopify-polaris-tooltip.css +31 -0
  249. package/src/presets/shopify-polaris/shopify-polaris.css +380 -0
  250. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-accordion.css +28 -0
  251. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-autocomplete.css +155 -0
  252. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-avatar.css +47 -0
  253. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-badge.css +27 -0
  254. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-banner.css +96 -0
  255. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-breadcrumb.css +16 -0
  256. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-button.css +68 -0
  257. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-card.css +28 -0
  258. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-checkbox.css +52 -0
  259. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-chip.css +16 -0
  260. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-combobox.css +184 -0
  261. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-datepicker.css +187 -0
  262. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-dialog.css +40 -0
  263. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-divider.css +12 -0
  264. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-drawer.css +40 -0
  265. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-empty.css +32 -0
  266. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-fileupload.css +72 -0
  267. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-form.css +8 -0
  268. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-input.css +72 -0
  269. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-menu.css +112 -0
  270. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-metric.css +16 -0
  271. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-numberinput.css +88 -0
  272. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-otpinput.css +42 -0
  273. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-page.css +69 -0
  274. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-passwordinput.css +76 -0
  275. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-popover.css +47 -0
  276. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-radio.css +54 -0
  277. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-ratinginput.css +42 -0
  278. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-select.css +118 -0
  279. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-skeleton.css +8 -0
  280. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-slider.css +86 -0
  281. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-spinner.css +16 -0
  282. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-splitter.css +34 -0
  283. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +55 -0
  284. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-switch.css +38 -0
  285. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-table.css +72 -0
  286. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-tabs.css +33 -0
  287. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-textarea.css +61 -0
  288. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-textlink.css +8 -0
  289. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-toast.css +43 -0
  290. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-toggle.css +52 -0
  291. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-tooltip.css +31 -0
  292. package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +381 -0
@@ -0,0 +1,133 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { OTPField as BaseOtp } from '@base-ui/react/otp-field';
3
+ import { Fragment, createContext, forwardRef, useContext, useEffect, useId, useState, } from 'react';
4
+ import { ToneProvider, useToneContext } from "../../utils/Tone.js";
5
+ /**
6
+ * Configure length and value on Root. Render an Input for each callback invocation from List; slot order is managed automatically. Keyboard navigation and paste distribution are built in; do not split or synchronize the code yourself.
7
+ *
8
+ * @example Complete composition
9
+ * import { OtpInput } from '@central-ui/react'
10
+ * import { Fragment } from 'react'
11
+ *
12
+ * function Example() {
13
+ * return (
14
+ * <OtpInput.Root length={6} name="code" defaultValue="123">
15
+ * <OtpInput.Container>
16
+ * <OtpInput.Label>Verification code</OtpInput.Label>
17
+ * <OtpInput.List>
18
+ * {(index) => (
19
+ * <Fragment key={index}>
20
+ * <OtpInput.Input />
21
+ * {index === 2 && <OtpInput.Separator />}
22
+ * </Fragment>
23
+ * )}
24
+ * </OtpInput.List>
25
+ * <OtpInput.Description>Enter the six-digit code.</OtpInput.Description>
26
+ * </OtpInput.Container>
27
+ * </OtpInput.Root>
28
+ * )
29
+ * }
30
+ *
31
+ * @example Hide the code while it is entered
32
+ * // Keep the same List; do not replace its Inputs with password inputs yourself.
33
+ * ;<OtpInput.Root length={6} mask>
34
+ * {
35
+ * // Rest of components here
36
+ * }
37
+ * </OtpInput.Root>
38
+ */
39
+ export const Root = forwardRef(function Root({ id, tone = 'neutral', children, ...props }, ref) {
40
+ const generatedId = useId();
41
+ const inputId = id ?? generatedId;
42
+ const [connections, setConnections] = useState({
43
+ descriptionIds: [],
44
+ });
45
+ return (_jsx(ToneProvider, { value: tone, children: _jsx(BaseOtp.Root, { ...props, id: inputId, ref: ref, "aria-labelledby": connections.labelId ?? props['aria-labelledby'], "aria-describedby": [props['aria-describedby'], ...connections.descriptionIds]
46
+ .filter(Boolean)
47
+ .join(' ') || undefined, render: (rootProps, state) => (_jsx(InputContext.Provider, { value: { ...state, inputId, connections, setConnections }, children: _jsx("div", { ...rootProps }) })), children: children }) }));
48
+ });
49
+ export const Input = forwardRef(function Input({ disableStyle, className, 'aria-describedby': describedBy, ...props }, ref) {
50
+ const context = useInputContext();
51
+ const tone = useToneContext();
52
+ return (_jsx(BaseOtp.Input, { ...props, ref: ref, "data-tone": tone, "aria-invalid": tone === 'invalid' || props['aria-invalid'] || undefined, "aria-describedby": [describedBy, ...context.connections.descriptionIds]
53
+ .filter(Boolean)
54
+ .join(' ') || undefined, "aria-labelledby": props['aria-labelledby'] ?? context.connections.labelId, "data-component": "otpinput-input", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
55
+ });
56
+ export const Container = forwardRef(function Container({ disableStyle, className, ...props }, ref) {
57
+ const attributes = usePartAttributes();
58
+ return (_jsx("div", { ...attributes, ...props, ref: ref, "data-component": "otpinput-container", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
59
+ });
60
+ /** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
61
+ export const Label = forwardRef(function Label({ disableStyle, className, id, ...props }, ref) {
62
+ const context = useInputContext();
63
+ const labelId = id ?? context.inputId + '-label';
64
+ const attributes = usePartAttributes();
65
+ useEffect(() => {
66
+ context.setConnections((current) => ({ ...current, labelId }));
67
+ return () => context.setConnections((current) => ({
68
+ ...current,
69
+ labelId: current.labelId === labelId ? undefined : current.labelId,
70
+ }));
71
+ }, [labelId, context.setConnections]);
72
+ return (_jsx("label", { ...attributes, ...props, id: labelId, ref: ref, htmlFor: context.inputId, "data-component": "otpinput-label", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
73
+ });
74
+ export const Description = forwardRef(function Description({ disableStyle, className, id, ...props }, ref) {
75
+ const messageId = useMessageId(id);
76
+ const attributes = usePartAttributes();
77
+ return (_jsx("div", { ...attributes, ...props, id: messageId, ref: ref, "data-component": "otpinput-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
78
+ });
79
+ /** You decide when to show this feedback. Changing tone does not validate data or render the message for you. */
80
+ export const Error = forwardRef(function Error({ disableStyle, className, id, ...props }, ref) {
81
+ const messageId = useMessageId(id);
82
+ const attributes = usePartAttributes();
83
+ return (_jsx("div", { role: "alert", "aria-atomic": "true", ...attributes, ...props, id: messageId, ref: ref, "data-component": "otpinput-error", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
84
+ });
85
+ /** You decide when to show this feedback. Changing tone does not validate data or render the message for you. */
86
+ export const Success = forwardRef(function Success({ disableStyle, className, id, ...props }, ref) {
87
+ const messageId = useMessageId(id);
88
+ const attributes = usePartAttributes();
89
+ return (_jsx("div", { role: "status", "aria-atomic": "true", ...attributes, ...props, id: messageId, ref: ref, "data-component": "otpinput-success", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
90
+ });
91
+ /** Calls children for each code slot. Render Input inside each callback; the component handles slot ordering and keyboard/paste behavior. */
92
+ export const List = forwardRef(function List({ disableStyle, className, children, ...props }, ref) {
93
+ const context = useInputContext();
94
+ const attributes = usePartAttributes();
95
+ return (_jsx("div", { ...attributes, ...props, ref: ref, "data-component": "otpinput-list", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: Array.from({ length: context.length }, (_, index) => (_jsx(Fragment, { children: children(index) }, index))) }));
96
+ });
97
+ export const Separator = forwardRef(function Separator({ disableStyle, className, ...props }, ref) {
98
+ return (_jsx(BaseOtp.Separator, { ...props, ref: ref, "data-component": "otpinput-separator", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
99
+ });
100
+ const InputContext = createContext(null);
101
+ function useInputContext() {
102
+ const context = useContext(InputContext);
103
+ if (!context)
104
+ throw new globalThis.Error('Parts must be inside Root');
105
+ return context;
106
+ }
107
+ function usePartAttributes() {
108
+ const context = useInputContext();
109
+ const tone = useToneContext();
110
+ return {
111
+ 'data-disabled': context.disabled ? '' : undefined,
112
+ 'data-readonly': context.readOnly ? '' : undefined,
113
+ 'data-required': context.required ? '' : undefined,
114
+ 'data-tone': tone,
115
+ };
116
+ }
117
+ function useMessageId(id) {
118
+ const generatedId = useId();
119
+ const messageId = id ?? generatedId;
120
+ const context = useInputContext();
121
+ useEffect(() => {
122
+ context.setConnections((current) => ({
123
+ ...current,
124
+ descriptionIds: [...current.descriptionIds, messageId],
125
+ }));
126
+ return () => context.setConnections((current) => ({
127
+ ...current,
128
+ descriptionIds: current.descriptionIds.filter((id) => id !== messageId),
129
+ }));
130
+ }, [messageId, context.setConnections]);
131
+ return messageId;
132
+ }
133
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/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,iBAAiB;IACxB,MAAM,OAAO,GAAG,eAAe,EAAE,CAAA;IACjC,MAAM,IAAI,GAAG,cAAc,EAAE,CAAA;IAC7B,OAAO;QACL,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QAClD,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QAClD,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QAClD,WAAW,EAAE,IAAI;KAClB,CAAA;AACH,CAAC;AACD,SAAS,YAAY,CAAC,EAAW;IAC/B,MAAM,WAAW,GAAG,KAAK,EAAE,CAAA;IAC3B,MAAM,SAAS,GAAG,EAAE,IAAI,WAAW,CAAA;IACnC,MAAM,OAAO,GAAG,eAAe,EAAE,CAAA;IACjC,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACnC,GAAG,OAAO;YACV,cAAc,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC;SACvD,CAAC,CAAC,CAAA;QACH,OAAO,GAAG,EAAE,CACV,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACnC,GAAG,OAAO;YACV,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC;SACxE,CAAC,CAAC,CAAA;IACP,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAA;IACvC,OAAO,SAAS,CAAA;AAClB,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type { StyleProps } from '../../types/Style.ts';
2
+ import type { ComponentProps, ReactElement, ReactNode } from 'react';
3
+ type PageSize = 'wide' | 'medium' | 'narrow';
4
+ /**
5
+ * Root configures the page width; Surface renders it. Choose the Header, Body sections, and Footer needed by the screen. Action areas take your own controls; they do not create actions automatically.
6
+ *
7
+ * @example Complete composition
8
+ * import { Page } from '@central-ui/react'
9
+ *
10
+ * function Example() {
11
+ * return (
12
+ * <Page.Root size="narrow">
13
+ * <Page.Surface>
14
+ * <Page.Header>
15
+ * <Page.HeaderTitle>Settings</Page.HeaderTitle>
16
+ * <Page.HeaderDescription>Manage preferences.</Page.HeaderDescription>
17
+ * </Page.Header>
18
+ * <Page.Body>
19
+ * <Page.BodySection>
20
+ * <Page.BodySectionTitle>Profile</Page.BodySectionTitle>
21
+ * </Page.BodySection>
22
+ * </Page.Body>
23
+ * </Page.Surface>
24
+ * </Page.Root>
25
+ * )
26
+ * }
27
+ */
28
+ export declare function Root({ size, children, }: {
29
+ /** Choose the shared size for the visible parts in this composition. */
30
+ size: PageSize;
31
+ children: ReactNode;
32
+ }): import("react").JSX.Element;
33
+ export declare function Surface({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
34
+ export declare function Header({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
35
+ export declare function HeaderMeta({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
36
+ export declare function HeaderContext({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
37
+ export declare function HeaderActions({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
38
+ export declare function HeaderBackButton({ disableStyle, type, className, ...props }: ComponentProps<'button'> & StyleProps): import("react").JSX.Element;
39
+ /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
40
+ export declare function HeaderBackButtonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
41
+ /** Omit for the supplied default icon; pass a child only to replace it. */
42
+ children?: ReactElement<ComponentProps<'svg'>>;
43
+ }) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement> & {
44
+ 'data-size'?: PageSize;
45
+ }, string | import("react").JSXElementConstructor<any>>;
46
+ export declare function HeaderTitle({ disableStyle, className, ...props }: ComponentProps<'h1'> & StyleProps): import("react").JSX.Element;
47
+ export declare function HeaderDescription({ disableStyle, className, ...props }: ComponentProps<'p'> & StyleProps): import("react").JSX.Element;
48
+ export declare function Body({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
49
+ export declare function BodySection({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
50
+ export declare function BodySectionHeader({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
51
+ export declare function BodySectionTitle({ disableStyle, className, ...props }: ComponentProps<'h2'> & StyleProps): import("react").JSX.Element;
52
+ export declare function Footer({ disableStyle, className, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
53
+ export {};
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIpE,KAAK,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAI5C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,wEAAwE;IACxE,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAEA;AAED,wBAAgB,OAAO,CAAC,EACtB,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,UAAU,+BAWpC;AA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EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,UAAU,+BAWpC;AAED,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,UAAU,+BAWpC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,UAAU,+BAWpC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,UAAU,+BAWnC;AAED,wBAAgB,MAAM,CAAC,EACrB,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,UAAU,+BAWpC"}
@@ -0,0 +1,100 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ArrowLeft } from 'lucide-react';
3
+ import { cloneElement, createContext, useContext } from 'react';
4
+ import { twMerge } from 'tailwind-merge';
5
+ const SizeContext = createContext('medium');
6
+ /**
7
+ * Root configures the page width; Surface renders it. Choose the Header, Body sections, and Footer needed by the screen. Action areas take your own controls; they do not create actions automatically.
8
+ *
9
+ * @example Complete composition
10
+ * import { Page } from '@central-ui/react'
11
+ *
12
+ * function Example() {
13
+ * return (
14
+ * <Page.Root size="narrow">
15
+ * <Page.Surface>
16
+ * <Page.Header>
17
+ * <Page.HeaderTitle>Settings</Page.HeaderTitle>
18
+ * <Page.HeaderDescription>Manage preferences.</Page.HeaderDescription>
19
+ * </Page.Header>
20
+ * <Page.Body>
21
+ * <Page.BodySection>
22
+ * <Page.BodySectionTitle>Profile</Page.BodySectionTitle>
23
+ * </Page.BodySection>
24
+ * </Page.Body>
25
+ * </Page.Surface>
26
+ * </Page.Root>
27
+ * )
28
+ * }
29
+ */
30
+ export function Root({ size, children, }) {
31
+ return _jsx(SizeContext.Provider, { value: size, children: children });
32
+ }
33
+ export function Surface({ disableStyle, className, ...props }) {
34
+ const size = useContext(SizeContext);
35
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-surface", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
36
+ }
37
+ export function Header({ disableStyle, className, ...props }) {
38
+ const size = useContext(SizeContext);
39
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-header", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
40
+ }
41
+ export function HeaderMeta({ disableStyle, className, ...props }) {
42
+ const size = useContext(SizeContext);
43
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-headermeta", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
44
+ }
45
+ export function HeaderContext({ disableStyle, className, ...props }) {
46
+ const size = useContext(SizeContext);
47
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-headercontext", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
48
+ }
49
+ export function HeaderActions({ disableStyle, className, ...props }) {
50
+ const size = useContext(SizeContext);
51
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-headeractions", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
52
+ }
53
+ export function HeaderBackButton({ disableStyle, type = 'button', className, ...props }) {
54
+ const size = useContext(SizeContext);
55
+ return (_jsx("button", { ...props, type: type, "data-size": size, "data-component": "page-headerbackbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
56
+ }
57
+ /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
58
+ export function HeaderBackButtonIcon({ disableStyle, children = _jsx(ArrowLeft, {}), className, ...props }) {
59
+ const size = useContext(SizeContext);
60
+ return cloneElement(children, {
61
+ ...children.props,
62
+ ...props,
63
+ 'data-size': size,
64
+ ...{
65
+ 'data-component': 'page-headerbackbuttonicon',
66
+ 'data-style-disabled': disableStyle ? '' : undefined,
67
+ },
68
+ className: twMerge(children.props.className, className),
69
+ strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 1.5,
70
+ });
71
+ }
72
+ export function HeaderTitle({ disableStyle, className, ...props }) {
73
+ const size = useContext(SizeContext);
74
+ return (_jsx("h1", { ...props, "data-size": size, "data-component": "page-headertitle", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
75
+ }
76
+ export function HeaderDescription({ disableStyle, className, ...props }) {
77
+ const size = useContext(SizeContext);
78
+ return (_jsx("p", { ...props, "data-size": size, "data-component": "page-headerdescription", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
79
+ }
80
+ export function Body({ disableStyle, className, ...props }) {
81
+ const size = useContext(SizeContext);
82
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-body", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
83
+ }
84
+ export function BodySection({ disableStyle, className, ...props }) {
85
+ const size = useContext(SizeContext);
86
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-bodysection", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
87
+ }
88
+ export function BodySectionHeader({ disableStyle, className, ...props }) {
89
+ const size = useContext(SizeContext);
90
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-bodysectionheader", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
91
+ }
92
+ export function BodySectionTitle({ disableStyle, className, ...props }) {
93
+ const size = useContext(SizeContext);
94
+ return (_jsx("h2", { ...props, "data-size": size, "data-component": "page-bodysectiontitle", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
95
+ }
96
+ export function Footer({ disableStyle, className, ...props }) {
97
+ const size = useContext(SizeContext);
98
+ return (_jsx("div", { ...props, "data-size": size, "data-component": "page-footer", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
99
+ }
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/page/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO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Props } from '../../types/Style.ts';
2
+ import { Root as RadixRoot, Input as RadixInput } from '@radix-ui/react-password-toggle-field';
3
+ import { Input as BaseInput } from '@base-ui/react/input';
4
+ import type { LucideProps } from 'lucide-react';
5
+ import type { ComponentProps, ComponentPropsWithRef, ReactElement } from 'react';
6
+ export type RootProps = ComponentProps<typeof RadixRoot> & Pick<ComponentProps<typeof RadixInput>, 'name' | 'form' | 'value' | 'defaultValue' | 'disabled' | 'readOnly' | 'required'> & Pick<BaseInput.Props, 'onValueChange'> & {
7
+ /** Choose the visual tone. This does not validate data or show/hide feedback messages. */
8
+ tone?: 'neutral' | 'valid' | 'invalid';
9
+ };
10
+ /**
11
+ * Configure the password on Root and use Input inside InputGroup. AddonVisibilityButton toggles visibility automatically; its visible/hidden icons follow that state. Do not maintain a second visibility state.
12
+ *
13
+ * @example Complete composition
14
+ * import { PasswordInput } from '@central-ui/react'
15
+ *
16
+ * function Example() {
17
+ * return (
18
+ * <PasswordInput.Root defaultValue="correct-horse" name="password">
19
+ * <PasswordInput.Container>
20
+ * <PasswordInput.Label>Password</PasswordInput.Label>
21
+ * <PasswordInput.InputGroup>
22
+ * <PasswordInput.Input
23
+ * autoComplete="current-password"
24
+ * placeholder="Enter password"
25
+ * />
26
+ * <PasswordInput.Addon>
27
+ * <PasswordInput.AddonVisibilityButton>
28
+ * <PasswordInput.AddonVisibleIcon></PasswordInput.AddonVisibleIcon>
29
+ * <PasswordInput.AddonHiddenIcon></PasswordInput.AddonHiddenIcon>
30
+ * </PasswordInput.AddonVisibilityButton>
31
+ * </PasswordInput.Addon>
32
+ * </PasswordInput.InputGroup>
33
+ * <PasswordInput.Description>Use your account password.</PasswordInput.Description>
34
+ * </PasswordInput.Container>
35
+ * </PasswordInput.Root>
36
+ * )
37
+ * }
38
+ *
39
+ * @example Start with the password visible
40
+ * // Visibility belongs to Root; the same icons and visibility button keep working.
41
+ * ;<PasswordInput.Root defaultVisible>
42
+ * {
43
+ * // Rest of components here
44
+ * }
45
+ * </PasswordInput.Root>
46
+ */
47
+ export declare function Root({ children, id, tone, value, defaultValue, onValueChange, disabled, readOnly, required, name, form, ...props }: RootProps): import("react").JSX.Element;
48
+ export type InputProps = Omit<ComponentPropsWithRef<typeof RadixInput>, keyof Pick<RootProps, 'id' | 'name' | 'form' | 'value' | 'defaultValue' | 'onValueChange' | 'disabled' | 'readOnly' | 'required'> | 'asChild'> & {
49
+ className?: string;
50
+ } & StyleProps;
51
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-password-toggle-field").PasswordToggleFieldInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "form" | "defaultValue" | "id" | "name" | "disabled" | "value" | "onValueChange" | "required" | "readOnly" | "asChild"> & {
52
+ className?: string;
53
+ } & StyleProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
54
+ export declare const InputGroup: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
55
+ export declare const Container: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
56
+ /** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
57
+ export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "htmlFor"> & StyleProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
58
+ export declare const Description: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
59
+ /** You decide when to show this feedback. Changing tone does not validate data or render the message for you. */
60
+ export declare const Error: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
61
+ /** You decide when to show this feedback. Changing tone does not validate data or render the message for you. */
62
+ export declare const Success: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
63
+ export declare const Addon: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
64
+ /** Choose the preset appearance; this does not add action behavior. */
65
+ variant?: "normal" | "emphasized";
66
+ } & StyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
67
+ export declare const AddonText: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
68
+ /** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
69
+ export declare function AddonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
70
+ /** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
71
+ children: ReactElement<ComponentProps<'svg'>>;
72
+ }) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
73
+ export declare const AddonButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
74
+ /** Built-in icon; no children needed. Use it inside its matching control. */
75
+ export declare const AddonLoadingIcon: import("react").ForwardRefExoticComponent<Omit<Omit<LucideProps, "children"> & StyleProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
76
+ /** Toggles password visibility automatically; do not maintain another visibility state. */
77
+ export declare const AddonVisibilityButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-password-toggle-field").PasswordToggleFieldToggleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement> & StyleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
78
+ /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
79
+ export declare function AddonVisibleIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
80
+ /** Omit for the supplied default icon; pass a child only to replace it. */
81
+ children?: ReactElement<ComponentProps<'svg'>>;
82
+ }) & StyleProps): import("react").JSX.Element;
83
+ /** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
84
+ export declare function AddonHiddenIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
85
+ /** Omit for the supplied default icon; pass a child only to replace it. */
86
+ children?: ReactElement<ComponentProps<'svg'>>;
87
+ }) & StyleProps): import("react").JSX.Element;
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/passwordinput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACL,IAAI,IAAI,SAAS,EACjB,KAAK,IAAI,UAAU,EAGpB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAY/C,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,YAAY,EAIb,MAAM,OAAO,CAAA;AAGd,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GACtD,IAAI,CACF,cAAc,CAAC,OAAO,UAAU,CAAC,EAC/B,MAAM,GACN,MAAM,GACN,OAAO,GACP,cAAc,GACd,UAAU,GACV,UAAU,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