asheeui 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/AsheeUIProvider.d.ts +34 -0
  2. package/dist/AsheeUIProvider.d.ts.map +1 -1
  3. package/dist/components/accordion/Accordion.d.ts +55 -44
  4. package/dist/components/accordion/Accordion.d.ts.map +1 -1
  5. package/dist/components/accordion/Accordion.js +27 -27
  6. package/dist/components/accordion/accordion-config.d.ts +41 -12
  7. package/dist/components/accordion/accordion-config.d.ts.map +1 -1
  8. package/dist/components/accordion/accordion-styles.d.ts +20 -0
  9. package/dist/components/accordion/accordion-styles.d.ts.map +1 -1
  10. package/dist/components/accordion/accordion-styles.js +1 -1
  11. package/dist/components/autocomplete/Autocomplete.d.ts +59 -39
  12. package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
  13. package/dist/components/autocomplete/Autocomplete.js +98 -91
  14. package/dist/components/autocomplete/autocomplete-config.d.ts +9 -62
  15. package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
  16. package/dist/components/autocomplete/autocomplete-config.js +6 -21
  17. package/dist/components/button/Button.d.ts +50 -51
  18. package/dist/components/button/Button.d.ts.map +1 -1
  19. package/dist/components/button/Button.js +19 -19
  20. package/dist/components/button/button-config.d.ts +23 -15
  21. package/dist/components/button/button-config.d.ts.map +1 -1
  22. package/dist/components/button/button-styles.d.ts +11 -1
  23. package/dist/components/button/button-styles.d.ts.map +1 -1
  24. package/dist/components/card/Card.d.ts +85 -43
  25. package/dist/components/card/Card.d.ts.map +1 -1
  26. package/dist/components/card/Card.js +49 -49
  27. package/dist/components/card/card-config.d.ts +35 -18
  28. package/dist/components/card/card-config.d.ts.map +1 -1
  29. package/dist/components/card/card-config.js +0 -2
  30. package/dist/components/card/card-styles.d.ts +17 -1
  31. package/dist/components/card/card-styles.d.ts.map +1 -1
  32. package/dist/components/carousel/Carousel.d.ts +107 -12
  33. package/dist/components/carousel/Carousel.d.ts.map +1 -1
  34. package/dist/components/carousel/Carousel.js +63 -64
  35. package/dist/components/carousel/carousel-config.d.ts +94 -7
  36. package/dist/components/carousel/carousel-config.d.ts.map +1 -1
  37. package/dist/components/carousel/carousel-config.js +6 -4
  38. package/dist/components/carousel/carousel-styles.d.ts +32 -1
  39. package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
  40. package/dist/components/chip/Chip.d.ts +55 -34
  41. package/dist/components/chip/Chip.d.ts.map +1 -1
  42. package/dist/components/chip/Chip.js +71 -72
  43. package/dist/components/chip/chip-config.d.ts +29 -15
  44. package/dist/components/chip/chip-config.d.ts.map +1 -1
  45. package/dist/components/chip/chip-config.js +5 -6
  46. package/dist/components/chip/chip-styles.d.ts +21 -1
  47. package/dist/components/chip/chip-styles.d.ts.map +1 -1
  48. package/dist/components/date-picker/DatePicker.d.ts +166 -2
  49. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  50. package/dist/components/date-picker/DatePicker.js +110 -99
  51. package/dist/components/date-picker/date-picker-config.d.ts +31 -0
  52. package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
  53. package/dist/components/date-picker/date-picker-config.js +8 -16
  54. package/dist/components/date-picker/date-picker-styles.d.ts +21 -1
  55. package/dist/components/date-picker/date-picker-styles.d.ts.map +1 -1
  56. package/dist/components/date-picker/date-picker-styles.js +7 -11
  57. package/dist/components/drawer/Drawer.d.ts +97 -7
  58. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  59. package/dist/components/drawer/Drawer.js +9 -9
  60. package/dist/components/drawer/drawer-config.d.ts +54 -1
  61. package/dist/components/drawer/drawer-config.d.ts.map +1 -1
  62. package/dist/components/drawer/drawer-styles.d.ts +21 -0
  63. package/dist/components/drawer/drawer-styles.d.ts.map +1 -1
  64. package/dist/components/field/FieldShell.d.ts +86 -0
  65. package/dist/components/field/FieldShell.d.ts.map +1 -1
  66. package/dist/components/field/field-config.d.ts +66 -3
  67. package/dist/components/field/field-config.d.ts.map +1 -1
  68. package/dist/components/field/field-config.js +2 -1
  69. package/dist/components/field/field-styles.d.ts +22 -0
  70. package/dist/components/field/field-styles.d.ts.map +1 -1
  71. package/dist/components/field/field-styles.js +10 -0
  72. package/dist/components/field/index.js +1 -0
  73. package/dist/components/image/Image.d.ts +35 -28
  74. package/dist/components/image/Image.d.ts.map +1 -1
  75. package/dist/components/image/Image.js +7 -7
  76. package/dist/components/image/image-config.d.ts +25 -7
  77. package/dist/components/image/image-config.d.ts.map +1 -1
  78. package/dist/components/image/image-styles.d.ts +9 -0
  79. package/dist/components/image/image-styles.d.ts.map +1 -1
  80. package/dist/components/input/Input.d.ts +117 -10
  81. package/dist/components/input/Input.d.ts.map +1 -1
  82. package/dist/components/input/Input.js +20 -20
  83. package/dist/components/input/PasswordInput.d.ts +48 -0
  84. package/dist/components/input/PasswordInput.d.ts.map +1 -1
  85. package/dist/components/input/input-config.d.ts +10 -1
  86. package/dist/components/input/input-config.d.ts.map +1 -1
  87. package/dist/components/input/input-config.js +5 -8
  88. package/dist/components/input/input-styles.d.ts +10 -0
  89. package/dist/components/input/input-styles.d.ts.map +1 -1
  90. package/dist/components/input/input-styles.js +5 -9
  91. package/dist/components/keyboard/OnScreenKeyboard.d.ts +58 -8
  92. package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
  93. package/dist/components/keyboard/OnScreenKeyboard.js +49 -48
  94. package/dist/components/keyboard/index.js +1 -1
  95. package/dist/components/keyboard/keyboard-config.d.ts +88 -3
  96. package/dist/components/keyboard/keyboard-config.d.ts.map +1 -1
  97. package/dist/components/keyboard/{default-keyboard-config.js → keyboard-config.js} +7 -1
  98. package/dist/components/keyboard/keyboard-context.d.ts +103 -13
  99. package/dist/components/keyboard/keyboard-context.d.ts.map +1 -1
  100. package/dist/components/keyboard/keyboard-context.js +66 -68
  101. package/dist/components/keyboard/use-keyboard-field.d.ts +37 -0
  102. package/dist/components/keyboard/use-keyboard-field.d.ts.map +1 -1
  103. package/dist/components/link/Link.d.ts +118 -9
  104. package/dist/components/link/Link.d.ts.map +1 -1
  105. package/dist/components/link/Link.js +29 -30
  106. package/dist/components/link/link-config.d.ts +58 -5
  107. package/dist/components/link/link-config.d.ts.map +1 -1
  108. package/dist/components/link/link-styles.d.ts +24 -4
  109. package/dist/components/link/link-styles.d.ts.map +1 -1
  110. package/dist/components/marquee/Marquee.d.ts +77 -8
  111. package/dist/components/marquee/Marquee.d.ts.map +1 -1
  112. package/dist/components/marquee/Marquee.js +5 -5
  113. package/dist/components/marquee/marquee-config.d.ts +74 -0
  114. package/dist/components/marquee/marquee-config.d.ts.map +1 -1
  115. package/dist/components/marquee/marquee-styles.d.ts +12 -0
  116. package/dist/components/marquee/marquee-styles.d.ts.map +1 -1
  117. package/dist/components/modal/Modal.d.ts +113 -25
  118. package/dist/components/modal/Modal.d.ts.map +1 -1
  119. package/dist/components/modal/Modal.js +75 -82
  120. package/dist/components/modal/modal-config.d.ts +59 -1
  121. package/dist/components/modal/modal-config.d.ts.map +1 -1
  122. package/dist/components/modal/modal-styles.d.ts +8 -1
  123. package/dist/components/modal/modal-styles.d.ts.map +1 -1
  124. package/dist/components/modal/modal-styles.js +4 -11
  125. package/dist/components/multi-select/MultiSelect.d.ts +152 -23
  126. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  127. package/dist/components/multi-select/MultiSelect.js +195 -217
  128. package/dist/components/multi-select/multi-select-config.d.ts +61 -23
  129. package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
  130. package/dist/components/multi-select/multi-select-config.js +16 -25
  131. package/dist/components/multi-select/multi-select-styles.d.ts +17 -0
  132. package/dist/components/multi-select/multi-select-styles.d.ts.map +1 -1
  133. package/dist/components/multi-select/multi-select-styles.js +9 -13
  134. package/dist/components/radio/Radio.d.ts +137 -13
  135. package/dist/components/radio/Radio.d.ts.map +1 -1
  136. package/dist/components/radio/Radio.js +66 -141
  137. package/dist/components/radio/RadioGroup.d.ts +88 -23
  138. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  139. package/dist/components/radio/RadioGroup.js +141 -66
  140. package/dist/components/radio/radio-config.d.ts +36 -11
  141. package/dist/components/radio/radio-config.d.ts.map +1 -1
  142. package/dist/components/radio/radio-config.js +9 -11
  143. package/dist/components/radio/radio-context.d.ts +44 -1
  144. package/dist/components/radio/radio-context.d.ts.map +1 -1
  145. package/dist/components/radio/radio-styles.d.ts +24 -1
  146. package/dist/components/radio/radio-styles.d.ts.map +1 -1
  147. package/dist/components/resizable-screen/ResizableScreen.d.ts +79 -32
  148. package/dist/components/resizable-screen/ResizableScreen.d.ts.map +1 -1
  149. package/dist/components/resizable-screen/ResizableScreen.js +77 -72
  150. package/dist/components/resizable-screen/resizable-screen-config.d.ts +62 -0
  151. package/dist/components/resizable-screen/resizable-screen-config.d.ts.map +1 -1
  152. package/dist/components/scrollbar/scrollbar-config.d.ts +44 -9
  153. package/dist/components/scrollbar/scrollbar-config.d.ts.map +1 -1
  154. package/dist/components/select/Select.d.ts +157 -17
  155. package/dist/components/select/Select.d.ts.map +1 -1
  156. package/dist/components/select/Select.js +141 -152
  157. package/dist/components/select/select-config.d.ts +26 -19
  158. package/dist/components/select/select-config.d.ts.map +1 -1
  159. package/dist/components/select/select-config.js +5 -21
  160. package/dist/components/select/select-styles.d.ts +10 -0
  161. package/dist/components/select/select-styles.d.ts.map +1 -1
  162. package/dist/components/select/select-styles.js +5 -9
  163. package/dist/components/select-menu/SelectMenu.d.ts +125 -8
  164. package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
  165. package/dist/components/select-menu/SelectMenu.js +107 -79
  166. package/dist/components/select-menu/index.d.ts +2 -0
  167. package/dist/components/select-menu/index.d.ts.map +1 -1
  168. package/dist/components/select-menu/index.js +1 -0
  169. package/dist/components/select-menu/select-menu-config.d.ts +82 -0
  170. package/dist/components/select-menu/select-menu-config.d.ts.map +1 -0
  171. package/dist/components/select-menu/select-menu-config.js +12 -0
  172. package/dist/components/sidebar/Sidebar.d.ts +151 -51
  173. package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
  174. package/dist/components/sidebar/Sidebar.js +211 -232
  175. package/dist/components/sidebar/sidebar-config.d.ts +140 -21
  176. package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
  177. package/dist/components/sidebar/sidebar-config.js +9 -12
  178. package/dist/components/sidebar/sidebar-styles.d.ts +24 -0
  179. package/dist/components/sidebar/sidebar-styles.d.ts.map +1 -1
  180. package/dist/components/spinner/spinner-config.d.ts +15 -9
  181. package/dist/components/spinner/spinner-config.d.ts.map +1 -1
  182. package/dist/components/spinner/spinner-styles.d.ts +10 -3
  183. package/dist/components/spinner/spinner-styles.d.ts.map +1 -1
  184. package/dist/components/spinner/spinner.d.ts +27 -20
  185. package/dist/components/spinner/spinner.d.ts.map +1 -1
  186. package/dist/components/spinner/spinner.js +18 -18
  187. package/dist/components/switch/Switch.d.ts +109 -9
  188. package/dist/components/switch/Switch.d.ts.map +1 -1
  189. package/dist/components/switch/Switch.js +19 -19
  190. package/dist/components/switch/switch-config.d.ts +20 -6
  191. package/dist/components/switch/switch-config.d.ts.map +1 -1
  192. package/dist/components/switch/switch-config.js +8 -16
  193. package/dist/components/switch/switch-styles.d.ts +17 -0
  194. package/dist/components/switch/switch-styles.d.ts.map +1 -1
  195. package/dist/components/table/Table.d.ts +101 -28
  196. package/dist/components/table/Table.d.ts.map +1 -1
  197. package/dist/components/table/Table.js +56 -56
  198. package/dist/components/table/table-config.d.ts +75 -8
  199. package/dist/components/table/table-config.d.ts.map +1 -1
  200. package/dist/components/table/table-styles.d.ts +25 -6
  201. package/dist/components/table/table-styles.d.ts.map +1 -1
  202. package/dist/components/tabs/Tabs.d.ts +84 -31
  203. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  204. package/dist/components/tabs/Tabs.js +44 -44
  205. package/dist/components/tabs/tabs-config.d.ts +102 -9
  206. package/dist/components/tabs/tabs-config.d.ts.map +1 -1
  207. package/dist/components/tabs/tabs-styles.d.ts +16 -4
  208. package/dist/components/tabs/tabs-styles.d.ts.map +1 -1
  209. package/dist/components/textarea/Textarea.d.ts +105 -11
  210. package/dist/components/textarea/Textarea.d.ts.map +1 -1
  211. package/dist/components/textarea/Textarea.js +27 -24
  212. package/dist/components/textarea/textarea-config.d.ts +21 -0
  213. package/dist/components/textarea/textarea-config.d.ts.map +1 -1
  214. package/dist/components/textarea/textarea-config.js +8 -16
  215. package/dist/components/textarea/textarea-styles.d.ts +9 -0
  216. package/dist/components/textarea/textarea-styles.d.ts.map +1 -1
  217. package/dist/components/textarea/textarea-styles.js +5 -9
  218. package/dist/components/toast/ToastItem.d.ts +58 -4
  219. package/dist/components/toast/ToastItem.d.ts.map +1 -1
  220. package/dist/components/toast/ToastItem.js +18 -18
  221. package/dist/components/toast/toast-config.d.ts +104 -6
  222. package/dist/components/toast/toast-config.d.ts.map +1 -1
  223. package/dist/components/toast/toast-context.d.ts +123 -11
  224. package/dist/components/toast/toast-context.d.ts.map +1 -1
  225. package/dist/components/toast/toast-context.js +19 -19
  226. package/dist/components/toast/toast-styles.d.ts +27 -5
  227. package/dist/components/toast/toast-styles.d.ts.map +1 -1
  228. package/dist/components/toast/use-pausable-timeout.d.ts +29 -0
  229. package/dist/components/toast/use-pausable-timeout.d.ts.map +1 -1
  230. package/dist/components/tooltip/Tooltip.d.ts +76 -16
  231. package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
  232. package/dist/components/tooltip/Tooltip.js +25 -25
  233. package/dist/components/tooltip/tooltip-config.d.ts +73 -3
  234. package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
  235. package/dist/components/tooltip/tooltip-styles.d.ts +12 -0
  236. package/dist/components/tooltip/tooltip-styles.d.ts.map +1 -1
  237. package/dist/config/config.d.ts +50 -2
  238. package/dist/config/config.d.ts.map +1 -1
  239. package/dist/config/default-config.d.ts +5 -0
  240. package/dist/config/default-config.d.ts.map +1 -1
  241. package/dist/config/default-config.js +23 -0
  242. package/dist/config/define-config.d.ts +23 -0
  243. package/dist/config/define-config.d.ts.map +1 -1
  244. package/dist/config/resolve-color.d.ts +25 -0
  245. package/dist/config/resolve-color.d.ts.map +1 -1
  246. package/dist/config/resolve-config.d.ts +23 -0
  247. package/dist/config/resolve-config.d.ts.map +1 -1
  248. package/dist/index.css +43 -7
  249. package/dist/index.d.ts +30 -2
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +120 -115
  252. package/dist/libs/context.d.ts +50 -1
  253. package/dist/libs/context.d.ts.map +1 -1
  254. package/dist/libs/registry.d.ts +61 -5
  255. package/dist/libs/registry.d.ts.map +1 -1
  256. package/dist/libs/use-isomorphic-layout-effect.d.ts +18 -0
  257. package/dist/libs/use-isomorphic-layout-effect.d.ts.map +1 -1
  258. package/dist/shared/index.d.ts +3 -0
  259. package/dist/shared/index.d.ts.map +1 -0
  260. package/dist/shared/radius.d.ts +37 -1
  261. package/dist/shared/radius.d.ts.map +1 -1
  262. package/dist/shared/variant.d.ts +31 -0
  263. package/dist/shared/variant.d.ts.map +1 -1
  264. package/dist/shared/variant.js +132 -45
  265. package/dist/theme/color.d.ts +89 -1
  266. package/dist/theme/color.d.ts.map +1 -1
  267. package/dist/theme/controller.d.ts +121 -0
  268. package/dist/theme/controller.d.ts.map +1 -1
  269. package/dist/theme/controller.js +84 -0
  270. package/dist/theme/useTheme.d.ts +68 -0
  271. package/dist/theme/useTheme.d.ts.map +1 -1
  272. package/dist/theme/useTheme.js +23 -0
  273. package/dist/utils/index.d.ts +0 -7
  274. package/dist/utils/index.d.ts.map +1 -1
  275. package/dist/utils/resolve-token.d.ts +101 -0
  276. package/dist/utils/resolve-token.d.ts.map +1 -1
  277. package/package.json +1 -1
  278. package/dist/components/keyboard/default-keyboard-config.d.ts +0 -10
  279. package/dist/components/keyboard/default-keyboard-config.d.ts.map +0 -1
  280. package/dist/shared/size.d.ts +0 -2
  281. package/dist/shared/size.d.ts.map +0 -1
@@ -1,8 +1,30 @@
1
1
  import { FieldSizeKey, FieldStatus, LabelAlign } from './field-config';
2
+ /**
3
+ * CSS classes for label alignment.
4
+ * Controls the text alignment of field labels.
5
+ */
2
6
  export declare const FIELD_LABEL_ALIGN_CLASS: Record<LabelAlign, string>;
7
+ /**
8
+ * CSS classes for status message text colors.
9
+ * Maps status values to Tailwind text color classes.
10
+ */
3
11
  export declare const FIELD_STATUS_TEXT_CLASS: Record<FieldStatus, string>;
12
+ /**
13
+ * CSS classes for label font size based on field size.
14
+ */
4
15
  export declare const FIELD_LABEL_SIZE_CLASS: Record<FieldSizeKey, string>;
16
+ /**
17
+ * CSS classes for description font size based on field size.
18
+ */
5
19
  export declare const FIELD_DESCRIPTION_SIZE_CLASS: Record<FieldSizeKey, string>;
20
+ /**
21
+ * CSS classes for message font size based on field size.
22
+ */
6
23
  export declare const FIELD_MESSAGE_SIZE_CLASS: Record<FieldSizeKey, string>;
24
+ /**
25
+ * CSS classes for field shell gap based on field size.
26
+ * Controls the spacing between field elements.
27
+ */
7
28
  export declare const FIELD_SHELL_GAP_CLASS: Record<FieldSizeKey, string>;
29
+ export declare const FIELD_STATUS_BORDER_CLASS: Record<FieldStatus, string>;
8
30
  //# sourceMappingURL=field-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-styles.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5E,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAK/D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAIrE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAIjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI9D,CAAC"}
1
+ {"version":3,"file":"field-styles.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAK/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAIrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAIjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI9D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAQjE,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ const r = {
3
+ default: "",
4
+ error: "border-danger focus-visible:border-danger focus-visible:ring-danger/20",
5
+ warning: "border-warning focus-visible:border-warning focus-visible:ring-warning/20",
6
+ success: "border-success focus-visible:border-success focus-visible:ring-success/20"
7
+ };
8
+ export {
9
+ r as FIELD_STATUS_BORDER_CLASS
10
+ };
@@ -1,2 +1,3 @@
1
1
  export * from "./FieldShell.js";
2
2
  export * from "./field-config.js";
3
+ export * from "./field-styles.js";
@@ -1,38 +1,20 @@
1
1
  import { ElementType, ImgHTMLAttributes } from 'react';
2
- import { Radius } from '../../shared/radius';
3
- import { ImageFit, ImageRatioKey } from './image-config';
2
+ import { ImageConfig } from './image-config';
3
+ type BaseImageProps = ImageConfig & ImgHTMLAttributes<HTMLImageElement>;
4
4
  /**
5
5
  * Configuration options for the Image component.
6
6
  */
7
- export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "children" | "alt"> {
8
- /** Accessible alternative text describing the image. */
9
- alt: string;
10
- /** Object-fit behaviour of the image inside its ratio box.
11
- *
12
- * @default "cover"
13
- */
14
- fit?: ImageFit;
15
- /** Container aspect ratio.
16
- *
17
- * @default "auto"
18
- */
19
- ratio?: ImageRatioKey;
20
- /** Corner rounding.
21
- *
22
- * @default "md"
7
+ export interface ImageProps extends BaseImageProps {
8
+ /**
9
+ * Fallback source shown when the primary `src` fails to load.
10
+ * When the primary image fails to load, this source is used instead.
23
11
  */
24
- radius?: Radius;
25
- /** Fallback source shown when the primary `src` fails to load. */
26
12
  fallbackSrc?: string;
27
- /** Shows a shimmering placeholder until the image loads.
28
- *
29
- * @default true
13
+ /**
14
+ * Custom image component to use instead of the native `<img>` tag
15
+ * (e.g. `next/image`).
16
+ * When provided, the component renders this instead of img.
30
17
  */
31
- showSkeleton?: boolean;
32
- /** Extra classes merged with internal styles. */
33
- className?: string;
34
- /** Custom image component to use instead of the native `<img>` tag
35
- * (e.g. `next/image`). */
36
18
  imageComponent?: ElementType;
37
19
  /**
38
20
  * Additional props to pass to the custom image component
@@ -55,6 +37,11 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "c
55
37
  * Visual tokens (`fit`, `ratio`, `radius`, `showSkeleton`, `loading`)
56
38
  * resolve through the standard AsheeUI cascade.
57
39
  *
40
+ * The component handles edge cases including cached images, error
41
+ * fallbacks, and proper cleanup of loading states. When using a
42
+ * custom image component, it automatically applies fill behavior
43
+ * for Next.js compatibility.
44
+ *
58
45
  * @param props - Image configuration options and native img attributes.
59
46
  * @param props.alt - Accessible alternative text.
60
47
  * @param props.fit - Object-fit behaviour. Defaults to "cover".
@@ -65,6 +52,9 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "c
65
52
  * @param props.className - Extra classes for the image element.
66
53
  * @param props.imageComponent - Custom image component.
67
54
  * @param props.imageProps - Props forwarded to the image component.
55
+ * @param props.src - The image source URL.
56
+ * @param props.onLoad - Callback fired when the image loads.
57
+ * @param props.onError - Callback fired when the image fails to load.
68
58
  *
69
59
  * @example
70
60
  * ```tsx
@@ -83,6 +73,23 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "c
83
73
  * );
84
74
  * }
85
75
  * ```
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * // With Next.js Image component
80
+ * import NextImage from "next/image";
81
+ *
82
+ * <Image
83
+ * src="/hero.png"
84
+ * alt="Hero image"
85
+ * imageComponent={NextImage}
86
+ * imageProps={{ priority: true, sizes: "100vw" }}
87
+ * />
88
+ * ```
89
+ *
90
+ * @see ImageConfig - The configuration type for component defaults.
91
+ * @see useAsheeConfig - Hook for accessing the global configuration.
86
92
  */
87
93
  export declare const Image: import('react').ForwardRefExoticComponent<ImageProps & import('react').RefAttributes<HTMLImageElement>>;
94
+ export {};
88
95
  //# sourceMappingURL=Image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAOhE,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IACrE,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;8BAC0B;IAC1B,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,KAAK,yGAsNjB,CAAC"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AASf,OAAO,EAEL,KAAK,WAAW,EAGjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,cAAc,GAAG,WAAW,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,eAAO,MAAM,KAAK,yGAsNjB,CAAC"}
@@ -2,10 +2,10 @@
2
2
  import { jsxs as P, jsx as _ } from "react/jsx-runtime";
3
3
  import { forwardRef as tt, useState as N, useRef as et, useEffect as z } from "react";
4
4
  import { useAsheeConfig as st } from "../../libs/context.js";
5
- import { RADIUS_CLASS as it } from "../../shared/radius.js";
6
- import { resolveCascade as o, resolveRadiusKey as nt, resolveClassKey as v } from "../../utils/resolve-token.js";
5
+ import { resolveCascade as o, resolveRadiusKey as it, resolveClassKey as v } from "../../utils/resolve-token.js";
7
6
  import { FALLBACK_IMAGE_CONFIG as i } from "./image-config.js";
8
- import { IMAGE_FIT_CLASS as lt, IMAGE_RATIO_CLASS as at } from "./image-styles.js";
7
+ import { IMAGE_FIT_CLASS as nt, IMAGE_RATIO_CLASS as lt } from "./image-styles.js";
8
+ import { RADIUS_CLASS as at } from "../../shared/radius.js";
9
9
  import { cn as I } from "../../utils/cn.js";
10
10
  function F(l) {
11
11
  return typeof l == "string" && l.trim().length > 0;
@@ -55,7 +55,7 @@ const dt = tt(
55
55
  e == null ? void 0 : e.ratio,
56
56
  void 0,
57
57
  i.ratio
58
- ), D = nt(
58
+ ), D = it(
59
59
  K,
60
60
  e == null ? void 0 : e.radius,
61
61
  A.defaultRadius,
@@ -72,15 +72,15 @@ const dt = tt(
72
72
  i.showSkeleton
73
73
  ), $ = v(
74
74
  T,
75
- lt,
75
+ nt,
76
76
  i.fit
77
77
  ), g = v(
78
78
  V,
79
- at,
79
+ lt,
80
80
  i.ratio
81
81
  ), m = v(
82
82
  D,
83
- it,
83
+ at,
84
84
  i.radius
85
85
  ), q = S || "img", y = !!S, H = F(n), J = (t == null ? void 0 : t.width) !== void 0 || (t == null ? void 0 : t.height) !== void 0 || (t == null ? void 0 : t.fill) !== void 0, Q = y && !J ? { fill: !0, sizes: "100%" } : {}, X = I(
86
86
  "h-full w-full transition-opacity duration-300",
@@ -1,4 +1,4 @@
1
- import { Radius } from '../../shared/radius';
1
+ import { Radius } from '../../shared';
2
2
  /**
3
3
  * Object-fit behaviour of the image inside its ratio box.
4
4
  *
@@ -25,27 +25,37 @@ export type ImageRatioKey = "auto" | "square" | "video" | "portrait";
25
25
  * component-level fallback tier of the theme cascade.
26
26
  */
27
27
  export interface ImageConfig {
28
- /** Object-fit strategy.
28
+ /**
29
+ * Object-fit strategy.
30
+ * Controls how the image fills its container.
29
31
  *
30
32
  * @default "cover"
31
33
  */
32
34
  fit?: ImageFit;
33
- /** Container aspect ratio.
35
+ /**
36
+ * Container aspect ratio.
37
+ * Controls the proportional dimensions of the image container.
34
38
  *
35
39
  * @default "auto"
36
40
  */
37
41
  ratio?: ImageRatioKey;
38
- /** Corner rounding.
42
+ /**
43
+ * Corner rounding.
44
+ * Controls the border-radius of the image container.
39
45
  *
40
46
  * @default "md"
41
47
  */
42
48
  radius?: Radius;
43
- /** Native image loading strategy.
49
+ /**
50
+ * Native image loading strategy.
51
+ * Controls when the browser loads the image resource.
44
52
  *
45
53
  * @default "lazy"
46
54
  */
47
55
  loading?: "lazy" | "eager";
48
- /** Shows a shimmering placeholder until the image loads.
56
+ /**
57
+ * Shows a shimmering placeholder until the image loads.
58
+ * Displays a subtle loading animation while the image is loading.
49
59
  *
50
60
  * @default true
51
61
  */
@@ -57,8 +67,16 @@ export interface ImageConfig {
57
67
  export declare const defaultImageConfig: ImageConfig;
58
68
  /**
59
69
  * Hard fallback values used when no config tier provides a value.
70
+ * These values are used when instance props, component config,
71
+ * and global defaults are all undefined.
60
72
  */
61
- export declare const FALLBACK_IMAGE_CONFIG: Required<ImageConfig>;
73
+ export declare const FALLBACK_IMAGE_CONFIG: {
74
+ readonly fit: "cover";
75
+ readonly ratio: "auto";
76
+ readonly radius: "md";
77
+ readonly loading: "lazy";
78
+ readonly showSkeleton: true;
79
+ };
62
80
  declare module "../../libs/registry" {
63
81
  interface ComponentTypeConfigRegistry {
64
82
  image: ImageConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"image-config.d.ts","sourceRoot":"","sources":["../../../src/components/image/image-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAErE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAMhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAM9C,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
1
+ {"version":3,"file":"image-config.d.ts","sourceRoot":"","sources":["../../../src/components/image/image-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAErE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAMhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
@@ -1,4 +1,13 @@
1
1
  import { ImageFit, ImageRatioKey } from './image-config';
2
+ /**
3
+ * CSS classes for image object-fit.
4
+ * Maps fit strategies to Tailwind object-fit utility classes.
5
+ */
2
6
  export declare const IMAGE_FIT_CLASS: Record<ImageFit, string>;
7
+ /**
8
+ * CSS classes for image aspect ratio.
9
+ * Maps ratio keys to Tailwind aspect-ratio utility classes.
10
+ * The "auto" ratio uses the image's intrinsic dimensions.
11
+ */
3
12
  export declare const IMAGE_RATIO_CLASS: Record<ImageRatioKey, string>;
4
13
  //# sourceMappingURL=image-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-styles.d.ts","sourceRoot":"","sources":["../../../src/components/image/image-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAK3D,CAAC"}
1
+ {"version":3,"file":"image-styles.d.ts","sourceRoot":"","sources":["../../../src/components/image/image-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAK3D,CAAC"}
@@ -1,22 +1,129 @@
1
1
  import { default as React, InputHTMLAttributes, ReactNode } from 'react';
2
- import { Radius } from '../../shared/radius';
3
- import { Color, Variant } from '../../shared/variant';
4
- import { FieldSizeKey, FieldStatus, LabelAlign } from '../field/field-config';
5
- export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "color" | "children"> {
6
- size?: FieldSizeKey;
7
- radius?: Radius;
8
- variant?: Variant;
9
- color?: Color;
10
- status?: FieldStatus;
2
+ import { InputConfig } from './input-config';
3
+ type BaseInputProps = InputConfig & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "color" | "children">;
4
+ /**
5
+ * Configuration options for the Input component.
6
+ */
7
+ export interface InputProps extends BaseInputProps {
8
+ /**
9
+ * Label text for the input.
10
+ * Displayed above the input field.
11
+ */
11
12
  label?: string;
12
- labelAlign?: LabelAlign;
13
+ /**
14
+ * Whether the input is in a loading state.
15
+ * Shows a loading spinner next to the label.
16
+ *
17
+ * @default false
18
+ */
13
19
  isLoading?: boolean;
20
+ /**
21
+ * Description text shown below the label.
22
+ * Provides additional context about the input.
23
+ */
14
24
  description?: string;
25
+ /**
26
+ * Validation message shown below the input.
27
+ * Color is determined by the status prop.
28
+ */
15
29
  message?: string;
30
+ /**
31
+ * Whether the field is required.
32
+ * Adds a required indicator (*) to the label.
33
+ *
34
+ * @default false
35
+ */
16
36
  required?: boolean;
37
+ /**
38
+ * Content rendered at the start of the input.
39
+ * Typically an icon or adornment.
40
+ */
17
41
  startContent?: ReactNode;
42
+ /**
43
+ * Content rendered at the end of the input.
44
+ * Typically an icon, button, or adornment.
45
+ */
18
46
  endContent?: ReactNode;
47
+ /**
48
+ * Whether the virtual keyboard should be enabled for mobile devices.
49
+ * Controls the inputmode attribute.
50
+ *
51
+ * @default true
52
+ */
19
53
  enableVirtualKeyboard?: boolean;
20
54
  }
55
+ /**
56
+ * A form input field with label, description, validation message,
57
+ * and content slot support.
58
+ *
59
+ * Input renders a text input with consistent styling and field layout.
60
+ * It supports start and end content slots for icons and adornments,
61
+ * validation states, loading state, and the standard AsheeUI cascade
62
+ * for visual tokens. The component integrates with FieldShell for
63
+ * label, description, and message handling.
64
+ *
65
+ * The component automatically handles accessibility attributes including
66
+ * aria-invalid, aria-describedby, and proper focus management. It also
67
+ * supports mobile virtual keyboard control via the enableVirtualKeyboard
68
+ * prop.
69
+ *
70
+ * @param props - Input configuration options and native input props.
71
+ * @param props.label - Label text for the input.
72
+ * @param props.isLoading - Loading state. Defaults to false.
73
+ * @param props.description - Description text.
74
+ * @param props.message - Validation message.
75
+ * @param props.required - Whether the field is required. Defaults to false.
76
+ * @param props.startContent - Content at the start of the input.
77
+ * @param props.endContent - Content at the end of the input.
78
+ * @param props.enableVirtualKeyboard - Enable mobile virtual keyboard. Defaults to true.
79
+ * @param props.size - Size of the input. Defaults to "md".
80
+ * @param props.radius - Corner rounding. Defaults to "md".
81
+ * @param props.variant - Visual style variant. Defaults to "bordered".
82
+ * @param props.color - Theme accent color. Defaults to "primary".
83
+ * @param props.status - Validation status.
84
+ * @param props.labelAlign - Alignment of the label. Defaults to "left".
85
+ * @param props.disabled - Whether the input is disabled.
86
+ * @param props.className - Extra CSS classes for the input.
87
+ * @param props.id - Optional ID for the field.
88
+ * @param props.style - Inline styles for the input.
89
+ *
90
+ * @example
91
+ * ```tsx
92
+ * import { Input } from "asheeui";
93
+ * import { useState } from "react";
94
+ *
95
+ * export function Example() {
96
+ * const [value, setValue] = useState("");
97
+ *
98
+ * return (
99
+ * <Input
100
+ * label="Email Address"
101
+ * description="We'll never share your email."
102
+ * placeholder="you@example.com"
103
+ * value={value}
104
+ * onChange={(e) => setValue(e.target.value)}
105
+ * startContent={<MailIcon />}
106
+ * />
107
+ * );
108
+ * }
109
+ * ```
110
+ *
111
+ * @example
112
+ * ```tsx
113
+ * // With validation state
114
+ * <Input
115
+ * label="Password"
116
+ * type="password"
117
+ * status="error"
118
+ * message="Password must be at least 8 characters"
119
+ * required
120
+ * />
121
+ * ```
122
+ *
123
+ * @see InputConfig - The configuration type for component defaults.
124
+ * @see FieldShell - The wrapper component for label and validation.
125
+ * @see useAsheeConfig - Hook for accessing the global configuration.
126
+ */
21
127
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
128
+ export {};
22
129
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAEZ,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,OAAO,EACb,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,OAAO,GAAG,UAAU,CAC9B;IACD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,KAAK,qFA4LjB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAEZ,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,eAAO,MAAM,KAAK,qFA4LjB,CAAC"}
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as X } from "react/jsx-runtime";
3
- import Y, { forwardRef as q, useRef as ee, useImperativeHandle as se, useId as re, useCallback as x } from "react";
3
+ import Y, { forwardRef as q, useRef as ee, useImperativeHandle as se, useId as re, useCallback as R } from "react";
4
4
  import { useAsheeConfig as ae } from "../../libs/context.js";
5
- import { RADIUS_CLASS as le } from "../../shared/radius.js";
6
- import { resolveVariantClass as oe } from "../../shared/variant.js";
7
- import { resolveCascade as c, resolveRadiusKey as te, resolveClassKey as ie } from "../../utils/resolve-token.js";
8
- import { FieldShell as de } from "../field/FieldShell.js";
5
+ import { resolveCascade as c, resolveRadiusKey as le, resolveClassKey as oe } from "../../utils/resolve-token.js";
6
+ import { FieldShell as te } from "../field/FieldShell.js";
9
7
  import { FALLBACK_FIELD_CONFIG as r } from "../field/field-config.js";
10
- import { INPUT_STATUS_BORDER_CLASS as ne, INPUT_SIZE_CLASS as ce } from "./input-styles.js";
11
- import { useKeyboardField as ue } from "../keyboard/use-keyboard-field.js";
12
- import { cn as K } from "../../utils/cn.js";
8
+ import { INPUT_STATUS_BORDER_CLASS as ie, INPUT_SIZE_CLASS as de } from "./input-styles.js";
9
+ import { useKeyboardField as ne } from "../keyboard/use-keyboard-field.js";
10
+ import { resolveVariantClass as ce } from "../../shared/variant.js";
11
+ import { RADIUS_CLASS as ue } from "../../shared/radius.js";
12
+ import { cn as x } from "../../utils/cn.js";
13
13
  const me = q(
14
14
  ({
15
15
  size: N,
@@ -34,15 +34,15 @@ const me = q(
34
34
  enableVirtualKeyboard: j = !0,
35
35
  ...B
36
36
  }, D) => {
37
- var R;
38
- const i = ae(), e = (R = i.components) == null ? void 0 : R.input, m = ee(null);
37
+ var K;
38
+ const i = ae(), e = (K = i.components) == null ? void 0 : K.input, m = ee(null);
39
39
  se(D, () => m.current);
40
- const k = re(), l = F ?? k, h = f ? `${l}-description` : void 0, I = v ? `${l}-message` : void 0, O = [h, I].filter(Boolean).join(" ") || void 0, { handleFocus: S, handleBlur: A } = ue(l, m, j), P = x(
40
+ const k = re(), l = F ?? k, h = f ? `${l}-description` : void 0, I = v ? `${l}-message` : void 0, O = [h, I].filter(Boolean).join(" ") || void 0, { handleFocus: S, handleBlur: A } = ne(l, m, j), P = R(
41
41
  (d) => {
42
42
  S(d), o == null || o(d);
43
43
  },
44
44
  [S, o]
45
- ), $ = x(
45
+ ), $ = R(
46
46
  (d) => {
47
47
  A(), t == null || t(d);
48
48
  },
@@ -62,7 +62,7 @@ const me = q(
62
62
  e == null ? void 0 : e.color,
63
63
  i.defaultColor,
64
64
  r.color
65
- ), H = te(
65
+ ), H = le(
66
66
  typeof p == "string" ? p : void 0,
67
67
  typeof (e == null ? void 0 : e.radius) == "string" ? e.radius : void 0,
68
68
  i.defaultRadius,
@@ -72,16 +72,16 @@ const me = q(
72
72
  e == null ? void 0 : e.labelAlign,
73
73
  void 0,
74
74
  r.labelAlign
75
- ), M = oe(
75
+ ), M = ce(
76
76
  g,
77
77
  Z
78
- ), Q = s !== "default" ? ne[s] : "", W = g === "underlined" ? "rounded-none" : ie(
78
+ ), Q = s !== "default" ? ie[s] : "", W = g === "underlined" ? "rounded-none" : oe(
79
79
  H,
80
- le,
80
+ ue,
81
81
  r.radius
82
82
  );
83
83
  return /* @__PURE__ */ n(
84
- de,
84
+ te,
85
85
  {
86
86
  id: l,
87
87
  label: z,
@@ -108,11 +108,11 @@ const me = q(
108
108
  "aria-busy": y,
109
109
  onFocus: P,
110
110
  onBlur: $,
111
- className: K(
111
+ className: x(
112
112
  "w-full text-foreground outline-none transition-colors shrink-0",
113
113
  "focus-visible:ring-2 focus-visible:ring-offset-2",
114
114
  "disabled:pointer-events-none disabled:opacity-50",
115
- ce[C],
115
+ de[C],
116
116
  M,
117
117
  Q,
118
118
  W,
@@ -127,7 +127,7 @@ const me = q(
127
127
  a && /* @__PURE__ */ n(
128
128
  "span",
129
129
  {
130
- className: K(
130
+ className: x(
131
131
  "absolute right-3 z-10 flex items-center",
132
132
  typeof a == "string" || Y.isValidElement(a) && a.type === "span" ? "pointer-events-none" : "",
133
133
  "text-foreground/50"
@@ -1,9 +1,57 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { InputProps } from './Input';
3
+ /**
4
+ * Configuration options for the PasswordInput component.
5
+ */
3
6
  export interface PasswordInputProps extends Omit<InputProps, "type" | "endContent"> {
7
+ /**
8
+ * Function that returns the aria-label for the toggle button.
9
+ * Receives the current visibility state and returns a label string.
10
+ */
4
11
  toggleAriaLabel?: (show: boolean) => string;
12
+ /**
13
+ * Icon shown when password is hidden (show button).
14
+ * Defaults to EyeIcon.
15
+ */
5
16
  offIcon?: ReactNode;
17
+ /**
18
+ * Icon shown when password is visible (hide button).
19
+ * Defaults to EyeOffIcon.
20
+ */
6
21
  onIcon?: ReactNode;
7
22
  }
23
+ /**
24
+ * A password input field with a toggleable visibility button.
25
+ *
26
+ * PasswordInput extends the Input component with a built-in toggle
27
+ * button that shows or hides the password text. It manages its own
28
+ * visibility state and provides appropriate aria-label handling for
29
+ * accessibility.
30
+ *
31
+ * @param props - PasswordInput configuration options.
32
+ * @param props.disabled - Whether the input is disabled.
33
+ * @param props.className - Extra CSS classes for the input.
34
+ * @param props.toggleAriaLabel - Function for toggle button aria-label.
35
+ * @param props.offIcon - Icon shown when password is hidden.
36
+ * @param props.onIcon - Icon shown when password is visible.
37
+ * @param props.autoComplete - Autocomplete attribute. Defaults to "current-password".
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * import { PasswordInput } from "asheeui";
42
+ *
43
+ * export function Example() {
44
+ * return (
45
+ * <PasswordInput
46
+ * label="Password"
47
+ * placeholder="Enter your password"
48
+ * required
49
+ * />
50
+ * );
51
+ * }
52
+ * ```
53
+ *
54
+ * @see Input - The base input component.
55
+ */
8
56
  export declare const PasswordInput: import('react').ForwardRefExoticComponent<PasswordInputProps & import('react').RefAttributes<HTMLInputElement>>;
9
57
  //# sourceMappingURL=PasswordInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/input/PasswordInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,CAAC;IAC5C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,iHAiDzB,CAAC"}
1
+ {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/input/PasswordInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/C;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,CAAC;IAE5C;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,aAAa,iHAiDzB,CAAC"}
@@ -1,7 +1,16 @@
1
1
  import { FieldConfig } from '../field/field-config';
2
+ /**
3
+ * Theme configuration options for the Input component.
4
+ * Extends the shared FieldConfig with input-specific options.
5
+ * Set under `components.input` in the AsheeUI config.
6
+ */
2
7
  export interface InputConfig extends FieldConfig {
3
8
  }
4
- export declare const defaultInputConfig: InputConfig;
9
+ /**
10
+ * Default config values registered for the Input component.
11
+ * Inherits the default field configuration.
12
+ */
13
+ export declare const defaultInputConfig: FieldConfig;
5
14
  declare module "../../libs/registry" {
6
15
  interface ComponentTypeConfigRegistry {
7
16
  input: InputConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"input-config.d.ts","sourceRoot":"","sources":["../../../src/components/input/input-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,MAAM,WAAW,WAAY,SAAQ,WAAW;CAAG;AAEnD,eAAO,MAAM,kBAAkB,EAAE,WAIhC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
1
+ {"version":3,"file":"input-config.d.ts","sourceRoot":"","sources":["../../../src/components/input/input-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;CAAG;AAEnD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aAAqB,CAAC;AAErD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
@@ -1,11 +1,8 @@
1
1
  "use client";
2
- import { registerComponentDefaults as e } from "../../libs/registry.js";
3
- const t = {
4
- size: "md",
5
- labelAlign: "left",
6
- variant: "bordered"
7
- };
8
- e("input", t);
2
+ import { registerComponentDefaults as t } from "../../libs/registry.js";
3
+ import { defaultFieldConfig as e } from "../field/field-config.js";
4
+ const o = e;
5
+ t("input", o);
9
6
  export {
10
- t as defaultInputConfig
7
+ o as defaultInputConfig
11
8
  };