@alveole/components 2.0.0-alpha.15 → 2.0.0-alpha.17

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 (392) hide show
  1. package/dist/core/AlveoleProvider/AlveoleProvider.d.ts +17 -0
  2. package/dist/core/AlveoleProvider/AlveoleProvider.d.ts.map +1 -0
  3. package/dist/core/AlveoleProvider/AlveoleProvider.js +15 -0
  4. package/dist/core/AlveoleProvider/index.d.ts +2 -0
  5. package/dist/core/AlveoleProvider/index.d.ts.map +1 -0
  6. package/dist/core/AlveoleProvider/index.js +1 -0
  7. package/dist/core/AnchorHeading/AnchorHeading.d.ts +6 -2
  8. package/dist/core/AnchorHeading/AnchorHeading.d.ts.map +1 -1
  9. package/dist/core/AnchorHeading/AnchorHeading.js +1 -1
  10. package/dist/core/AnchorHeading/AnchorHeading.stories.d.ts +2 -1
  11. package/dist/core/AnchorHeading/AnchorHeading.stories.d.ts.map +1 -1
  12. package/dist/core/AnchorHeading/AnchorHeading.stories.js +1 -0
  13. package/dist/core/AnchorHeading/AnchorHeading.stories.sources.d.ts +2 -0
  14. package/dist/core/AnchorHeading/AnchorHeading.stories.sources.d.ts.map +1 -1
  15. package/dist/core/AnchorHeading/AnchorHeading.stories.sources.js +2 -0
  16. package/dist/core/AnchorHeading/AnchorHeading.web.d.ts +1 -1
  17. package/dist/core/AnchorHeading/AnchorHeading.web.d.ts.map +1 -1
  18. package/dist/core/AnchorHeading/AnchorHeading.web.js +7 -4
  19. package/dist/core/AnchorHeading/slug.d.ts +3 -0
  20. package/dist/core/AnchorHeading/slug.d.ts.map +1 -1
  21. package/dist/core/AnchorHeading/slug.js +11 -0
  22. package/dist/core/Box/Box.d.ts +15 -15
  23. package/dist/core/Box/Box.d.ts.map +1 -1
  24. package/dist/core/Box/Box.js +9 -6
  25. package/dist/core/Box/Box.stories.d.ts +19 -15
  26. package/dist/core/Box/Box.stories.d.ts.map +1 -1
  27. package/dist/core/Box/Box.stories.js +21 -4
  28. package/dist/core/Box/Box.stories.sources.d.ts +8 -0
  29. package/dist/core/Box/Box.stories.sources.d.ts.map +1 -1
  30. package/dist/core/Box/Box.stories.sources.js +11 -3
  31. package/dist/core/Box/Box.types.d.ts +21 -15
  32. package/dist/core/Box/Box.types.d.ts.map +1 -1
  33. package/dist/core/Box/elementDuTag.d.ts +2 -0
  34. package/dist/core/Box/elementDuTag.d.ts.map +1 -0
  35. package/dist/core/Box/elementDuTag.js +12 -0
  36. package/dist/core/Code/Code.stories.d.ts +2 -2
  37. package/dist/core/Code/Code.stories.js +1 -1
  38. package/dist/core/Code/Code.stories.sources.d.ts.map +1 -1
  39. package/dist/core/Code/Code.stories.sources.js +1 -1
  40. package/dist/core/Code/Code.styles.d.ts +2 -2
  41. package/dist/core/Form/Form.stories.js +1 -1
  42. package/dist/core/Form/Form.stories.sources.d.ts.map +1 -1
  43. package/dist/core/Form/Form.stories.sources.js +1 -1
  44. package/dist/core/Grid/Grid.stories.d.ts +15 -14
  45. package/dist/core/Grid/Grid.stories.d.ts.map +1 -1
  46. package/dist/core/Grid/Grid.stories.js +14 -12
  47. package/dist/core/Grid/Grid.stories.sources.d.ts.map +1 -1
  48. package/dist/core/Grid/Grid.stories.sources.js +9 -9
  49. package/dist/core/Heading/Heading.d.ts +8 -0
  50. package/dist/core/Heading/Heading.d.ts.map +1 -0
  51. package/dist/core/Heading/Heading.js +15 -0
  52. package/dist/core/Heading/Heading.stories.d.ts +13 -0
  53. package/dist/core/Heading/Heading.stories.d.ts.map +1 -0
  54. package/dist/core/Heading/Heading.stories.js +13 -0
  55. package/dist/core/Heading/Heading.stories.sources.d.ts +8 -0
  56. package/dist/core/Heading/Heading.stories.sources.d.ts.map +1 -0
  57. package/dist/core/Heading/Heading.stories.sources.js +8 -0
  58. package/dist/core/Heading/index.d.ts +2 -0
  59. package/dist/core/Heading/index.d.ts.map +1 -0
  60. package/dist/core/Heading/index.js +1 -0
  61. package/dist/core/Highlight/Highlight.stories.d.ts +4 -4
  62. package/dist/core/Highlight/Highlight.styles.d.ts +4 -4
  63. package/dist/core/Highlight/Highlight.theme.d.ts +1 -3
  64. package/dist/core/Highlight/Highlight.theme.d.ts.map +1 -1
  65. package/dist/core/Highlight/Highlight.theme.js +9 -16
  66. package/dist/core/Map/Map.js +1 -1
  67. package/dist/core/MarkdownDescription/MarkdownDescription.js +1 -1
  68. package/dist/core/MarkdownDescription/markdownComponents.d.ts +3 -3
  69. package/dist/core/MarkdownDescription/markdownComponents.d.ts.map +1 -1
  70. package/dist/core/MarkdownDescription/markdownComponents.js +14 -12
  71. package/dist/core/MarkdownDescription/markdownNatif.d.ts.map +1 -1
  72. package/dist/core/MarkdownDescription/markdownNatif.js +5 -4
  73. package/dist/core/Page/PageContent.d.ts.map +1 -1
  74. package/dist/core/Page/PageContent.js +1 -1
  75. package/dist/core/Page/PageContentScrollable.d.ts +15 -15
  76. package/dist/core/Page/usePageStatusBar.d.ts.map +1 -1
  77. package/dist/core/Page/usePageStatusBar.js +3 -3
  78. package/dist/core/Section/Section.stories.d.ts.map +1 -1
  79. package/dist/core/Section/Section.stories.js +8 -6
  80. package/dist/core/Section/Section.stories.sources.d.ts.map +1 -1
  81. package/dist/core/Section/Section.stories.sources.js +4 -4
  82. package/dist/core/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -1
  83. package/dist/core/ThemeProvider/ThemeProvider.stories.js +17 -12
  84. package/dist/core/ThemeProvider/ThemeProvider.stories.sources.d.ts.map +1 -1
  85. package/dist/core/ThemeProvider/ThemeProvider.stories.sources.js +2 -2
  86. package/dist/core/Typography/Typography.stories.d.ts +1 -0
  87. package/dist/core/Typography/Typography.stories.d.ts.map +1 -1
  88. package/dist/core/Typography/Typography.stories.js +2 -0
  89. package/dist/core/Typography/Typography.stories.sources.d.ts +2 -0
  90. package/dist/core/Typography/Typography.stories.sources.d.ts.map +1 -1
  91. package/dist/core/Typography/Typography.stories.sources.js +2 -0
  92. package/dist/core/Typography/Typography.styles.d.ts +1 -1
  93. package/dist/core/Version/Version.stories.d.ts +1 -1
  94. package/dist/core/Version/Version.styles.d.ts +1 -1
  95. package/dist/core/index.d.ts +2 -0
  96. package/dist/core/index.d.ts.map +1 -1
  97. package/dist/core/index.js +2 -0
  98. package/dist/core/styleTamagui/flexDuWeb.d.ts +1 -1
  99. package/dist/core/styleTamagui/flexDuWeb.d.ts.map +1 -1
  100. package/dist/core/styleTamagui/flexDuWeb.js +4 -3
  101. package/dist/core/styleTamagui/fondAuSurvol.d.ts +5 -4
  102. package/dist/core/styleTamagui/fondAuSurvol.d.ts.map +1 -1
  103. package/dist/generated/version.d.ts +1 -1
  104. package/dist/generated/version.js +1 -1
  105. package/dist/stories/index.d.ts +1 -0
  106. package/dist/stories/index.d.ts.map +1 -1
  107. package/dist/stories/index.js +1 -0
  108. package/dist/ui/Accordion/Accordion.stories.d.ts +8 -8
  109. package/dist/ui/Accordion/Accordion.styles.d.ts +8 -8
  110. package/dist/ui/Accordion/Accordion.styles.js +2 -2
  111. package/dist/ui/Avatar/Avatar.stories.d.ts +2 -2
  112. package/dist/ui/Avatar/Avatar.styles.d.ts +2 -2
  113. package/dist/ui/Badge/Badge.stories.d.ts +12 -12
  114. package/dist/ui/Badge/Badge.stories.js +3 -3
  115. package/dist/ui/Badge/Badge.stories.sources.d.ts.map +1 -1
  116. package/dist/ui/Badge/Badge.stories.sources.js +3 -3
  117. package/dist/ui/Badge/Badge.styles.d.ts +12 -12
  118. package/dist/ui/BottomSheet/BottomSheet.d.ts.map +1 -1
  119. package/dist/ui/BottomSheet/BottomSheet.js +2 -1
  120. package/dist/ui/BottomSheet/BottomSheet.stories.d.ts +2 -2
  121. package/dist/ui/BottomSheet/BottomSheet.styles.d.ts +2 -2
  122. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts +3 -3
  123. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.js +6 -6
  124. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.sources.d.ts.map +1 -1
  125. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.sources.js +6 -6
  126. package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts +3 -3
  127. package/dist/ui/Button/Button.d.ts +4 -2
  128. package/dist/ui/Button/Button.d.ts.map +1 -1
  129. package/dist/ui/Button/Button.stories.d.ts +49 -49
  130. package/dist/ui/Button/Button.stories.js +8 -8
  131. package/dist/ui/Button/Button.stories.sources.d.ts.map +1 -1
  132. package/dist/ui/Button/Button.stories.sources.js +8 -8
  133. package/dist/ui/Button/Button.styles.d.ts +48 -48
  134. package/dist/ui/Button/buttonIconStyling.d.ts +4 -20
  135. package/dist/ui/Button/buttonIconStyling.d.ts.map +1 -1
  136. package/dist/ui/Card/Card.stories.d.ts +5 -3
  137. package/dist/ui/Card/Card.stories.d.ts.map +1 -1
  138. package/dist/ui/Card/Card.stories.js +8 -1
  139. package/dist/ui/Card/Card.stories.sources.d.ts +4 -0
  140. package/dist/ui/Card/Card.stories.sources.d.ts.map +1 -1
  141. package/dist/ui/Card/Card.stories.sources.js +5 -1
  142. package/dist/ui/Card/Card.styles.d.ts +2 -2
  143. package/dist/ui/Card/CardHeader.styles.d.ts +3 -3
  144. package/dist/ui/Card/CardSection.styles.d.ts +3 -3
  145. package/dist/ui/Checkbox/Checkbox.d.ts.map +1 -1
  146. package/dist/ui/Checkbox/Checkbox.js +1 -3
  147. package/dist/ui/Checkbox/Checkbox.stories.d.ts +10 -10
  148. package/dist/ui/Checkbox/Checkbox.stories.js +2 -2
  149. package/dist/ui/Checkbox/Checkbox.stories.sources.d.ts.map +1 -1
  150. package/dist/ui/Checkbox/Checkbox.stories.sources.js +2 -2
  151. package/dist/ui/Checkbox/Checkbox.styles.d.ts +10 -10
  152. package/dist/ui/Checkbox/Checkbox.styles.js +6 -6
  153. package/dist/ui/Counter/Counter.stories.d.ts +3 -3
  154. package/dist/ui/Counter/Counter.stories.js +1 -1
  155. package/dist/ui/Counter/Counter.stories.sources.d.ts.map +1 -1
  156. package/dist/ui/Counter/Counter.stories.sources.js +1 -1
  157. package/dist/ui/Counter/Counter.styles.d.ts +3 -3
  158. package/dist/ui/DataTable/DataTable.stories.d.ts +11 -11
  159. package/dist/ui/DataTable/DataTable.styles.d.ts +11 -11
  160. package/dist/ui/DateInput/DateInput.d.ts +2 -2
  161. package/dist/ui/DateInput/DateInput.d.ts.map +1 -1
  162. package/dist/ui/DateInput/DateInput.ios.d.ts +2 -1
  163. package/dist/ui/DateInput/DateInput.ios.d.ts.map +1 -1
  164. package/dist/ui/DateInput/DateInput.stories.d.ts +1 -1
  165. package/dist/ui/DateInput/DateInput.stories.js +2 -2
  166. package/dist/ui/DateInput/DateInput.stories.sources.d.ts.map +1 -1
  167. package/dist/ui/DateInput/DateInput.stories.sources.js +2 -2
  168. package/dist/ui/Divider/Divider.stories.d.ts +1 -1
  169. package/dist/ui/Divider/Divider.stories.d.ts.map +1 -1
  170. package/dist/ui/Divider/Divider.stories.js +1 -1
  171. package/dist/ui/Divider/Divider.stories.sources.d.ts.map +1 -1
  172. package/dist/ui/Divider/Divider.stories.sources.js +1 -1
  173. package/dist/ui/Divider/Divider.styles.d.ts +1 -1
  174. package/dist/ui/DocumentViewer/DocumentViewer.stories.d.ts +11 -11
  175. package/dist/ui/DocumentViewer/DocumentViewer.stories.d.ts.map +1 -1
  176. package/dist/ui/DocumentViewer/DocumentViewer.stories.js +2 -2
  177. package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.d.ts.map +1 -1
  178. package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.js +2 -2
  179. package/dist/ui/DocumentViewer/DocumentViewer.styles.d.ts +11 -11
  180. package/dist/ui/DocumentViewer/chargementDePdfJs.d.ts.map +1 -1
  181. package/dist/ui/DocumentViewer/chargementDePdfJs.js +3 -1
  182. package/dist/ui/DurationInput/DurationInput.d.ts +2 -1
  183. package/dist/ui/DurationInput/DurationInput.d.ts.map +1 -1
  184. package/dist/ui/DurationInput/DurationInput.stories.d.ts +1 -1
  185. package/dist/ui/DurationInput/DurationInput.stories.js +2 -2
  186. package/dist/ui/DurationInput/DurationInput.stories.sources.d.ts.map +1 -1
  187. package/dist/ui/DurationInput/DurationInput.stories.sources.js +2 -2
  188. package/dist/ui/EmptyState/EmptyState.stories.d.ts +4 -4
  189. package/dist/ui/EmptyState/EmptyState.styles.d.ts +4 -4
  190. package/dist/ui/FileDropZone/FileDropZone.stories.d.ts +4 -4
  191. package/dist/ui/FileDropZone/FileDropZone.stories.js +3 -3
  192. package/dist/ui/FileDropZone/FileDropZone.stories.sources.d.ts.map +1 -1
  193. package/dist/ui/FileDropZone/FileDropZone.stories.sources.js +3 -3
  194. package/dist/ui/FileDropZone/FileDropZone.styles.d.ts +4 -4
  195. package/dist/ui/FilterDate/FilterDate.stories.d.ts +1 -1
  196. package/dist/ui/FilterDate/FilterDate.styles.d.ts +1 -1
  197. package/dist/ui/FormControl/ChampHHMM.d.ts +2 -2
  198. package/dist/ui/FormControl/ChampHHMM.d.ts.map +1 -1
  199. package/dist/ui/FormControl/FormControl.d.ts +2 -2
  200. package/dist/ui/FormControl/FormControl.d.ts.map +1 -1
  201. package/dist/ui/FormControl/FormControl.stories.d.ts +18 -18
  202. package/dist/ui/FormControl/FormControl.stories.js +4 -4
  203. package/dist/ui/FormControl/FormControl.stories.sources.d.ts.map +1 -1
  204. package/dist/ui/FormControl/FormControl.stories.sources.js +4 -4
  205. package/dist/ui/FormControl/FormControl.styles.d.ts +17 -17
  206. package/dist/ui/FormControl/NumberInput.d.ts +2 -1
  207. package/dist/ui/FormControl/NumberInput.d.ts.map +1 -1
  208. package/dist/ui/FormControl/NumberInput.stories.d.ts +18 -18
  209. package/dist/ui/FormControl/NumberInput.stories.d.ts.map +1 -1
  210. package/dist/ui/FormControl/NumberInput.stories.js +2 -1
  211. package/dist/ui/FormControl/NumberInput.stories.sources.d.ts.map +1 -1
  212. package/dist/ui/FormControl/NumberInput.stories.sources.js +1 -1
  213. package/dist/ui/FormControl/OtpInput.stories.d.ts +5 -5
  214. package/dist/ui/FormControl/OtpInput.stories.js +1 -1
  215. package/dist/ui/FormControl/OtpInput.stories.sources.d.ts.map +1 -1
  216. package/dist/ui/FormControl/OtpInput.stories.sources.js +1 -1
  217. package/dist/ui/FormControl/OtpInput.styles.d.ts +5 -5
  218. package/dist/ui/FormControl/OtpInput.styles.js +2 -2
  219. package/dist/ui/FormControl/TextInput.d.ts +1 -1
  220. package/dist/ui/FormControl/TextInput.d.ts.map +1 -1
  221. package/dist/ui/FormControl/TextInput.stories.d.ts +18 -18
  222. package/dist/ui/FormControl/TextInput.types.d.ts +3 -2
  223. package/dist/ui/FormControl/TextInput.types.d.ts.map +1 -1
  224. package/dist/ui/FormControl/TextInputInline.d.ts +2 -2
  225. package/dist/ui/FormControl/TextInputInline.d.ts.map +1 -1
  226. package/dist/ui/FormControl/TextInputMirror.d.ts +2 -2
  227. package/dist/ui/FormControl/TextInputMirror.d.ts.map +1 -1
  228. package/dist/ui/FormControl/TextInputModal.d.ts +2 -2
  229. package/dist/ui/FormControl/TextInputModal.d.ts.map +1 -1
  230. package/dist/ui/FormControl/TextInputPassword.d.ts +2 -1
  231. package/dist/ui/FormControl/TextInputPassword.d.ts.map +1 -1
  232. package/dist/ui/FormControl/fieldBorderState.d.ts +1 -1
  233. package/dist/ui/FormControl/fieldBorderState.d.ts.map +1 -1
  234. package/dist/ui/FormControl/otpTheme.d.ts +1 -1
  235. package/dist/ui/FormControl/otpTheme.d.ts.map +1 -1
  236. package/dist/ui/FormControl/otpTheme.js +0 -3
  237. package/dist/ui/FormControl/textInputStyles.d.ts +52 -0
  238. package/dist/ui/FormControl/textInputStyles.d.ts.map +1 -1
  239. package/dist/ui/FormControl/useTextInputModal.d.ts +4 -3
  240. package/dist/ui/FormControl/useTextInputModal.d.ts.map +1 -1
  241. package/dist/ui/Header/Header.stories.d.ts +4 -4
  242. package/dist/ui/Header/Header.styles.d.ts +4 -4
  243. package/dist/ui/InputButtonAdornment/InputButtonAdornment.stories.d.ts +2 -2
  244. package/dist/ui/InputButtonAdornment/InputButtonAdornment.stories.js +1 -1
  245. package/dist/ui/InputButtonAdornment/InputButtonAdornment.stories.sources.d.ts.map +1 -1
  246. package/dist/ui/InputButtonAdornment/InputButtonAdornment.stories.sources.js +1 -1
  247. package/dist/ui/InputButtonAdornment/InputButtonAdornment.styles.d.ts +2 -2
  248. package/dist/ui/Link/Link.stories.d.ts +1 -1
  249. package/dist/ui/Link/Link.styles.d.ts +1 -1
  250. package/dist/ui/ListItem/ListItem.stories.d.ts +6 -6
  251. package/dist/ui/ListItem/ListItem.styles.d.ts +6 -6
  252. package/dist/ui/LucideIcon/LucideIcon.stories.d.ts.map +1 -1
  253. package/dist/ui/LucideIcon/LucideIcon.stories.js +2 -1
  254. package/dist/ui/LucideIcon/LucideIcon.stories.sources.d.ts.map +1 -1
  255. package/dist/ui/LucideIcon/LucideIcon.stories.sources.js +1 -1
  256. package/dist/ui/LucideIcon/catalogueLucide.d.ts +36 -0
  257. package/dist/ui/LucideIcon/catalogueLucide.d.ts.map +1 -1
  258. package/dist/ui/LucideIcon/vendor/lab.js +1 -1
  259. package/dist/ui/LucideIcon/vendor/lucide.d.ts +1936 -1780
  260. package/dist/ui/LucideIcon/vendor/lucide.js +3 -3
  261. package/dist/ui/PageHeader/PageHeader.stories.d.ts +1 -1
  262. package/dist/ui/PageHeader/PageHeader.styles.d.ts +1 -1
  263. package/dist/ui/Popover/Popover.js +1 -1
  264. package/dist/ui/Popover/Popover.stories.d.ts +6 -6
  265. package/dist/ui/Popover/Popover.styles.d.ts +6 -6
  266. package/dist/ui/PriceInput/PriceInput.d.ts +2 -3
  267. package/dist/ui/PriceInput/PriceInput.d.ts.map +1 -1
  268. package/dist/ui/PriceInput/PriceInput.js +2 -2
  269. package/dist/ui/PriceInput/PriceInput.stories.d.ts +22 -6
  270. package/dist/ui/PriceInput/PriceInput.stories.d.ts.map +1 -1
  271. package/dist/ui/PriceInput/PriceInput.stories.js +2 -1
  272. package/dist/ui/PriceInput/PriceInput.stories.sources.d.ts +2 -0
  273. package/dist/ui/PriceInput/PriceInput.stories.sources.d.ts.map +1 -1
  274. package/dist/ui/PriceInput/PriceInput.stories.sources.js +3 -1
  275. package/dist/ui/PriceInput/PriceInput.styles.d.ts +20 -5
  276. package/dist/ui/PriceInput/PriceInput.styles.d.ts.map +1 -1
  277. package/dist/ui/PriceInput/PriceInput.styles.js +20 -6
  278. package/dist/ui/PriceInput/PriceInput.web.d.ts +0 -1
  279. package/dist/ui/PriceInput/PriceInput.web.d.ts.map +1 -1
  280. package/dist/ui/PriceInput/PriceInput.web.js +9 -10
  281. package/dist/ui/PriceInput/cadrePrix.d.ts +43 -0
  282. package/dist/ui/PriceInput/cadrePrix.d.ts.map +1 -0
  283. package/dist/ui/PriceInput/cadrePrix.js +9 -0
  284. package/dist/ui/PriceInput/largeurDuChamp.d.ts +2 -0
  285. package/dist/ui/PriceInput/largeurDuChamp.d.ts.map +1 -0
  286. package/dist/ui/PriceInput/largeurDuChamp.js +2 -0
  287. package/dist/ui/PriceInput/useSaisieMontant.d.ts +5 -0
  288. package/dist/ui/PriceInput/useSaisieMontant.d.ts.map +1 -0
  289. package/dist/ui/PriceInput/useSaisieMontant.js +19 -0
  290. package/dist/ui/ProgressBar/ProgressBar.stories.d.ts +7 -7
  291. package/dist/ui/ProgressBar/ProgressBar.styles.d.ts +7 -7
  292. package/dist/ui/RadioGroup/RadioGroup.stories.d.ts +8 -8
  293. package/dist/ui/RadioGroup/RadioGroup.stories.js +2 -2
  294. package/dist/ui/RadioGroup/RadioGroup.stories.sources.d.ts.map +1 -1
  295. package/dist/ui/RadioGroup/RadioGroup.stories.sources.js +2 -2
  296. package/dist/ui/RadioGroup/RadioGroup.styles.d.ts +8 -8
  297. package/dist/ui/RadioGroup/RadioGroup.styles.js +4 -4
  298. package/dist/ui/RadioGroup/RadioGroupCard.js +1 -1
  299. package/dist/ui/RadioGroup/RadioGroupItem.styles.d.ts +1 -1
  300. package/dist/ui/ResourceList/ResourceList.stories.d.ts +2 -2
  301. package/dist/ui/ResourceList/ResourceList.styles.d.ts +2 -2
  302. package/dist/ui/ResourceList/ResourceListDivider.js +1 -1
  303. package/dist/ui/Select/Select.stories.d.ts +8 -8
  304. package/dist/ui/Select/Select.stories.js +12 -12
  305. package/dist/ui/Select/Select.stories.sources.d.ts.map +1 -1
  306. package/dist/ui/Select/Select.stories.sources.js +11 -11
  307. package/dist/ui/Select/Select.styles.d.ts +8 -8
  308. package/dist/ui/Select/SelectBottomSheet.d.ts.map +1 -1
  309. package/dist/ui/Select/SelectBottomSheet.js +3 -3
  310. package/dist/ui/Select/SelectList.styles.d.ts +14 -14
  311. package/dist/ui/Select/SelectList.styles.js +3 -3
  312. package/dist/ui/Select/selectControlStyle.d.ts +130 -2
  313. package/dist/ui/Select/selectControlStyle.d.ts.map +1 -1
  314. package/dist/ui/Select/selectItemStyle.d.ts +5 -5
  315. package/dist/ui/Select/selectTriggerStyle.d.ts +53 -1
  316. package/dist/ui/Select/selectTriggerStyle.d.ts.map +1 -1
  317. package/dist/ui/Sidebar/Sidebar.stories.d.ts +20 -20
  318. package/dist/ui/Sidebar/Sidebar.stories.d.ts.map +1 -1
  319. package/dist/ui/Sidebar/Sidebar.stories.js +1 -1
  320. package/dist/ui/Sidebar/Sidebar.stories.sources.d.ts.map +1 -1
  321. package/dist/ui/Sidebar/Sidebar.stories.sources.js +1 -1
  322. package/dist/ui/Sidebar/Sidebar.styles.d.ts +20 -20
  323. package/dist/ui/Sidebar/Sidebar.styles.js +3 -3
  324. package/dist/ui/Sidebar/SidebarHeader.d.ts.map +1 -1
  325. package/dist/ui/Sidebar/SidebarHeader.js +4 -1
  326. package/dist/ui/Sidebar/SidebarItem.d.ts +8 -2
  327. package/dist/ui/Sidebar/SidebarItem.d.ts.map +1 -1
  328. package/dist/ui/Sidebar/SidebarItem.js +5 -2
  329. package/dist/ui/Signature/Signature.js +1 -1
  330. package/dist/ui/Signature/Signature.stories.d.ts +2 -2
  331. package/dist/ui/Signature/Signature.styles.d.ts +2 -2
  332. package/dist/ui/Skeleton/Skeleton.js +1 -1
  333. package/dist/ui/Skeleton/Skeleton.stories.d.ts +1 -1
  334. package/dist/ui/Skeleton/Skeleton.stories.d.ts.map +1 -1
  335. package/dist/ui/Skeleton/Skeleton.stories.js +3 -3
  336. package/dist/ui/Skeleton/Skeleton.stories.sources.d.ts.map +1 -1
  337. package/dist/ui/Skeleton/Skeleton.stories.sources.js +3 -3
  338. package/dist/ui/Skeleton/Skeleton.styles.d.ts +1 -1
  339. package/dist/ui/Spinner/Spinner.stories.d.ts +2 -2
  340. package/dist/ui/Spinner/Spinner.stories.js +2 -2
  341. package/dist/ui/Spinner/Spinner.stories.sources.d.ts.map +1 -1
  342. package/dist/ui/Spinner/Spinner.stories.sources.js +2 -2
  343. package/dist/ui/Spinner/Spinner.styles.d.ts +2 -2
  344. package/dist/ui/Spinner/useRotation.d.ts +3 -1
  345. package/dist/ui/Spinner/useRotation.d.ts.map +1 -1
  346. package/dist/ui/Spinner/useSpinner.d.ts +3 -3
  347. package/dist/ui/Switch/Switch.d.ts.map +1 -1
  348. package/dist/ui/Switch/Switch.js +2 -3
  349. package/dist/ui/Switch/Switch.stories.d.ts +9 -9
  350. package/dist/ui/Switch/Switch.stories.js +1 -1
  351. package/dist/ui/Switch/Switch.stories.sources.d.ts.map +1 -1
  352. package/dist/ui/Switch/Switch.stories.sources.js +1 -1
  353. package/dist/ui/Switch/Switch.styles.d.ts +9 -9
  354. package/dist/ui/Tabs/Tabs.stories.d.ts +6 -5
  355. package/dist/ui/Tabs/Tabs.stories.d.ts.map +1 -1
  356. package/dist/ui/Tabs/Tabs.stories.js +3 -1
  357. package/dist/ui/Tabs/Tabs.stories.sources.d.ts +2 -0
  358. package/dist/ui/Tabs/Tabs.stories.sources.d.ts.map +1 -1
  359. package/dist/ui/Tabs/Tabs.stories.sources.js +3 -1
  360. package/dist/ui/Tabs/Tabs.styles.d.ts +5 -5
  361. package/dist/ui/Tag/Tag.stories.d.ts +7 -7
  362. package/dist/ui/Tag/Tag.stories.js +5 -5
  363. package/dist/ui/Tag/Tag.stories.sources.d.ts.map +1 -1
  364. package/dist/ui/Tag/Tag.stories.sources.js +5 -5
  365. package/dist/ui/Tag/Tag.styles.d.ts +7 -7
  366. package/dist/ui/Tag/tagStyling.d.ts +2 -2
  367. package/dist/ui/TextInputArray/TextInputArray.js +1 -1
  368. package/dist/ui/TextareaInput/TextareaInput.d.ts +2 -2
  369. package/dist/ui/TextareaInput/TextareaInput.d.ts.map +1 -1
  370. package/dist/ui/TextareaInput/TextareaInput.stories.d.ts +1 -1
  371. package/dist/ui/TextareaInput/TextareaInput.stories.js +1 -1
  372. package/dist/ui/TextareaInput/TextareaInput.stories.sources.d.ts.map +1 -1
  373. package/dist/ui/TextareaInput/TextareaInput.stories.sources.js +1 -1
  374. package/dist/ui/TimeInput/TimeInput.d.ts +2 -1
  375. package/dist/ui/TimeInput/TimeInput.d.ts.map +1 -1
  376. package/dist/ui/TimeInput/TimeInput.stories.d.ts +1 -1
  377. package/dist/ui/TimeInput/TimeInput.stories.js +2 -2
  378. package/dist/ui/TimeInput/TimeInput.stories.sources.d.ts.map +1 -1
  379. package/dist/ui/TimeInput/TimeInput.stories.sources.js +2 -2
  380. package/dist/ui/Toast/Toast.stories.d.ts +11 -11
  381. package/dist/ui/Toast/Toast.stories.js +2 -2
  382. package/dist/ui/Toast/Toast.stories.sources.d.ts.map +1 -1
  383. package/dist/ui/Toast/Toast.stories.sources.js +2 -2
  384. package/dist/ui/Toast/Toast.styles.d.ts +11 -11
  385. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.stories.d.ts +5 -53
  386. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.stories.d.ts.map +1 -1
  387. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.styles.d.ts +4 -4
  388. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts +3 -3
  389. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts +3 -3
  390. package/dist/ui/ToolbarTop/toolbarTopStyling.d.ts +4 -4
  391. package/package.json +24 -24
  392. package/dist/ui/PriceInput/PriceInput.css +0 -9
@@ -19,7 +19,7 @@ declare const _default: {
19
19
  gap: string | number;
20
20
  };
21
21
  title: {
22
- color: string;
22
+ color: import("@alveole/theme").ThemeColor;
23
23
  fontSize: 24 | 22;
24
24
  lineHeight: 28 | 32;
25
25
  letterSpacing: 0;
@@ -12,7 +12,7 @@ export declare const useStyles: () => {
12
12
  gap: string | number;
13
13
  };
14
14
  title: {
15
- color: string;
15
+ color: import("@alveole/theme").ThemeColor;
16
16
  fontSize: 24 | 22;
17
17
  lineHeight: 28 | 32;
18
18
  letterSpacing: 0;
@@ -22,5 +22,5 @@ export const Popover = (props) => {
22
22
  const maxW = popoverStyles.maxW ?? '100%';
23
23
  return (_jsxs(TamaguiPopover, { placement: placement, disableFocus: true, open: open, onOpenChange: setOpen, children: [_jsx(TamaguiPopover.Trigger, { asChild: true, children: renderTrigger({ open }) }), _jsx(TamaguiPopover.Content, { trapFocus: false, disableFocusScope: true, ...spacings,
24
24
  // {...styles.tamaguiPopoverContent}
25
- style: [{ maxHeight: scrollable ? maxH : undefined, maxWidth: scrollable ? maxW : undefined }, styles.content], children: scrollable ? (_jsx(YStack, { style: { overflow: 'hidden' }, children: _jsx(ScrollView, { style: { maxHeight: maxH - spacingValue('025'), flexGrow: 0, flexShrink: 0 }, children: children }) })) : (children) })] }));
25
+ style: [{ maxHeight: scrollable ? maxH : undefined, maxWidth: scrollable ? maxW : undefined }, styles.content], children: scrollable ? (_jsx(YStack, { style: { overflow: 'hidden' }, children: _jsx(ScrollView, { style: { maxHeight: maxH - spacingValue('1V'), flexGrow: 0, flexShrink: 0 }, children: children }) })) : (children) })] }));
26
26
  };
@@ -17,8 +17,8 @@ declare const _default: {
17
17
  borderRadius: import("@alveole/theme").Radius;
18
18
  borderWidth: number;
19
19
  borderStyle: "solid";
20
- borderColor: string;
21
- backgroundColor: string;
20
+ borderColor: import("@alveole/theme").ThemeColor;
21
+ backgroundColor: import("@alveole/theme").ThemeColor;
22
22
  } | {
23
23
  shadowColor: string;
24
24
  shadowOffset: {
@@ -38,8 +38,8 @@ declare const _default: {
38
38
  borderRadius: import("@alveole/theme").Radius;
39
39
  borderWidth: number;
40
40
  borderStyle: "solid";
41
- borderColor: string;
42
- backgroundColor: string;
41
+ borderColor: import("@alveole/theme").ThemeColor;
42
+ backgroundColor: import("@alveole/theme").ThemeColor;
43
43
  } | {
44
44
  boxShadow: string;
45
45
  display: "flex";
@@ -52,8 +52,8 @@ declare const _default: {
52
52
  borderRadius: import("@alveole/theme").Radius;
53
53
  borderWidth: number;
54
54
  borderStyle: "solid";
55
- borderColor: string;
56
- backgroundColor: string;
55
+ borderColor: import("@alveole/theme").ThemeColor;
56
+ backgroundColor: import("@alveole/theme").ThemeColor;
57
57
  };
58
58
  };
59
59
  };
@@ -10,8 +10,8 @@ export declare const useStyles: () => {
10
10
  borderRadius: import("@alveole/theme").Radius;
11
11
  borderWidth: number;
12
12
  borderStyle: "solid";
13
- borderColor: string;
14
- backgroundColor: string;
13
+ borderColor: import("@alveole/theme").ThemeColor;
14
+ backgroundColor: import("@alveole/theme").ThemeColor;
15
15
  } | {
16
16
  shadowColor: string;
17
17
  shadowOffset: {
@@ -31,8 +31,8 @@ export declare const useStyles: () => {
31
31
  borderRadius: import("@alveole/theme").Radius;
32
32
  borderWidth: number;
33
33
  borderStyle: "solid";
34
- borderColor: string;
35
- backgroundColor: string;
34
+ borderColor: import("@alveole/theme").ThemeColor;
35
+ backgroundColor: import("@alveole/theme").ThemeColor;
36
36
  } | {
37
37
  boxShadow: string;
38
38
  display: "flex";
@@ -45,8 +45,8 @@ export declare const useStyles: () => {
45
45
  borderRadius: import("@alveole/theme").Radius;
46
46
  borderWidth: number;
47
47
  borderStyle: "solid";
48
- borderColor: string;
49
- backgroundColor: string;
48
+ borderColor: import("@alveole/theme").ThemeColor;
49
+ backgroundColor: import("@alveole/theme").ThemeColor;
50
50
  };
51
51
  };
52
52
  //# sourceMappingURL=Popover.styles.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { TextInput as ReactNativeTextInput } from 'react-native';
3
- import { NumberInputProps } from '../FormControl';
2
+ import { NumberInputProps, TextInputElement } from '../FormControl';
4
3
  export type PriceInputProps = NumberInputProps & {
5
4
  autoFocus?: boolean;
6
5
  devise?: '€';
@@ -10,5 +9,5 @@ export declare const PriceInput: React.ForwardRefExoticComponent<NumberInputProp
10
9
  autoFocus?: boolean;
11
10
  devise?: "\u20AC";
12
11
  onChange?: NumberInputProps["onChange"];
13
- } & React.RefAttributes<ReactNativeTextInput>>;
12
+ } & React.RefAttributes<TextInputElement>>;
14
13
  //# sourceMappingURL=PriceInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PriceInput.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAC;AAIpE,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,UAAU;gBALT,OAAO;aACV,QAAG;eACD,gBAAgB,CAAC,UAAU,CAAC;8CAuCvC,CAAC"}
1
+ {"version":3,"file":"PriceInput.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIpE,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,UAAU;gBALT,OAAO;aACV,QAAG;eACD,gBAAgB,CAAC,UAAU,CAAC;0CAuCvC,CAAC"}
@@ -6,11 +6,11 @@ import { Typography } from '../../core/Typography';
6
6
  import { useFieldFocus } from '../FormControl/useFieldFocus';
7
7
  import { useStyles } from './PriceInput.styles';
8
8
  export const PriceInput = React.forwardRef(function PriceInput(props, ref) {
9
- const { value, devise, onChange, ...inputProps } = props;
9
+ const { value, devise, onChange, onKeyDown: _k, ...inputProps } = props;
10
10
  const styles = useStyles();
11
11
  const champ = useFieldFocus({ disabled: props.disabled, readOnly: props.readOnly });
12
12
  const numberLength = value ? String(value).length : 1;
13
- return (_jsx(Box, { tag: "price-input", style: { ...styles.container, ...(champ.focus ? styles.containerFocused : {}) }, children: _jsxs(Box, { tag: "price-input-container", style: styles.priceInputContainer, children: [_jsx(ReactNativeTextInput, { ref: ref, style: {
13
+ return (_jsx(Box, { tag: "price-input", style: { ...styles.container, ...(champ.focus ? styles.inputFocused : {}) }, children: _jsxs(Box, { tag: "price-input-container", style: styles.priceInputContainer, children: [_jsx(ReactNativeTextInput, { ref: ref, style: {
14
14
  ...styles.input,
15
15
  minWidth: numberLength * 36,
16
16
  }, ...inputProps, value: Number.isNaN(value) || value == null ? '' : String(value), onChangeText: e => {
@@ -8,19 +8,33 @@ declare const _default: {
8
8
  autoFocus?: boolean;
9
9
  devise?: "\u20AC";
10
10
  onChange?: import("..").NumberInputProps["onChange"];
11
- } & import("react").RefAttributes<import("react-native").TextInput>>;
11
+ } & import("react").RefAttributes<import("..").TextInputElement>>;
12
12
  styleFn: () => {
13
13
  container: {
14
14
  display: "flex";
15
15
  flexDirection: "column";
16
16
  width: "100%";
17
17
  borderBottomWidth: number;
18
- borderBottomColor: string;
18
+ borderBottomColor: import("@alveole/theme").ThemeColor;
19
19
  paddingBottom: string | number;
20
20
  };
21
- containerFocused: {
21
+ inputFocused: {
22
22
  borderBottomWidth: number;
23
23
  borderBottomColor: string;
24
+ borderRadius: import("@alveole/theme").Radius;
25
+ outlineWidth?: number;
26
+ outlineStyle?: "solid";
27
+ outlineColor?: string;
28
+ outlineOffset?: number;
29
+ };
30
+ inputError: {
31
+ borderBottomColor: import("@alveole/theme").ThemeColor;
32
+ };
33
+ inputSuccess: {
34
+ borderBottomColor: import("@alveole/theme").ThemeColor;
35
+ };
36
+ inputDisabled: {
37
+ borderBottomColor: import("@alveole/theme").ThemeColor;
24
38
  };
25
39
  priceInputContainer: {
26
40
  display: "flex";
@@ -30,13 +44,14 @@ declare const _default: {
30
44
  input: {
31
45
  outline: string;
32
46
  borderWidth: number;
47
+ backgroundColor: "transparent";
33
48
  textAlign: "center";
34
- color: string;
49
+ color: import("@alveole/theme").ThemeColor;
35
50
  fontFamily: string;
36
51
  fontSize: 64;
37
52
  };
38
53
  inputPlaceholder: {
39
- color: string;
54
+ color: import("@alveole/theme").ThemeColor;
40
55
  };
41
56
  inputDevise: {
42
57
  position: "relative";
@@ -46,7 +61,7 @@ declare const _default: {
46
61
  letterSpacing: 0;
47
62
  fontFamily: string;
48
63
  fontWeight?: import("react-native").TextStyle["fontWeight"];
49
- color: string;
64
+ color: import("@alveole/theme").ThemeColor;
50
65
  marginTop: string;
51
66
  marginBottom: string;
52
67
  };
@@ -54,5 +69,6 @@ declare const _default: {
54
69
  };
55
70
  export default _default;
56
71
  export declare const Default: () => import("react").JSX.Element;
72
+ export declare const States: () => import("react").JSX.Element;
57
73
  export * as Sources from './PriceInput.stories.sources';
58
74
  //# sourceMappingURL=PriceInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PriceInput.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBASkB;AAElB,eAAO,MAAM,OAAO,mCAYnB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"PriceInput.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBASkB;AAElB,eAAO,MAAM,OAAO,mCAYnB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAYlB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC"}
@@ -15,6 +15,7 @@ export default {
15
15
  };
16
16
  export const Default = () => {
17
17
  const [value, setValue] = useState(null);
18
- return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 24, children: [_jsx(FormControl, { label: "Montant", children: _jsx(PriceInput, { value: value, onChange: setValue }) }), _jsx(FormControl, { label: "Montant saisi", children: _jsx(PriceInput, { value: 1250, onChange: () => { } }) })] }));
18
+ return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsx(FormControl, { label: "Montant", children: _jsx(PriceInput, { value: value, onChange: setValue }) }), _jsx(FormControl, { label: "Montant saisi", children: _jsx(PriceInput, { value: 1250, onChange: () => { } }) })] }));
19
19
  };
20
+ export const States = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsx(FormControl, { label: "Erreur", error: "Montant requis", children: _jsx(PriceInput, { value: null, error: "Montant requis", onChange: () => { } }) }), _jsx(FormControl, { label: "Succ\u00E8s", success: "Enregistr\u00E9", children: _jsx(PriceInput, { value: 1250, success: "Enregistr\u00E9", onChange: () => { } }) }), _jsx(FormControl, { label: "D\u00E9sactiv\u00E9", disabled: true, children: _jsx(PriceInput, { value: 1250, disabled: true, onChange: () => { } }) })] }));
20
21
  export * as Sources from './PriceInput.stories.sources';
@@ -1,6 +1,8 @@
1
1
  export declare const Default: () => string;
2
+ export declare const States: () => string;
2
3
  export declare const storySources: {
3
4
  readonly Default: () => string;
5
+ readonly States: () => string;
4
6
  };
5
7
  export type StorySourceName = keyof typeof storySources;
6
8
  //# sourceMappingURL=PriceInput.stories.sources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PriceInput.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAwb,CAAC;AAE7c,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"PriceInput.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA0b,CAAC;AAE/c,eAAO,MAAM,MAAM,cAAsjB,CAAC;AAE1kB,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -1,6 +1,8 @@
1
1
  // This file is generated. Do not edit manually.
2
2
  // Source: src/ui/PriceInput/PriceInput.stories.tsx
3
- export const Default = () => "export const Default = () => {\n const [value, setValue] = useState<number | null>(null);\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap={24}>\n <FormControl label=\"Montant\">\n <PriceInput value={value} onChange={setValue} />\n </FormControl>\n <FormControl label=\"Montant saisi\">\n <PriceInput value={1250} onChange={() => {}} />\n </FormControl>\n </Box>\n );\n};";
3
+ export const Default = () => "export const Default = () => {\n const [value, setValue] = useState<number | null>(null);\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <FormControl label=\"Montant\">\n <PriceInput value={value} onChange={setValue} />\n </FormControl>\n <FormControl label=\"Montant saisi\">\n <PriceInput value={1250} onChange={() => {}} />\n </FormControl>\n </Box>\n );\n};";
4
+ export const States = () => "export const States = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <FormControl label=\"Erreur\" error=\"Montant requis\">\n <PriceInput value={null} error=\"Montant requis\" onChange={() => {}} />\n </FormControl>\n <FormControl label=\"Succès\" success=\"Enregistré\">\n <PriceInput value={1250} success=\"Enregistré\" onChange={() => {}} />\n </FormControl>\n <FormControl label=\"Désactivé\" disabled>\n <PriceInput value={1250} disabled onChange={() => {}} />\n </FormControl>\n </Box>\n);";
4
5
  export const storySources = {
5
6
  Default,
7
+ States,
6
8
  };
@@ -4,12 +4,26 @@ export declare const useStyles: () => {
4
4
  flexDirection: "column";
5
5
  width: "100%";
6
6
  borderBottomWidth: number;
7
- borderBottomColor: string;
7
+ borderBottomColor: import("@alveole/theme").ThemeColor;
8
8
  paddingBottom: string | number;
9
9
  };
10
- containerFocused: {
10
+ inputFocused: {
11
11
  borderBottomWidth: number;
12
12
  borderBottomColor: string;
13
+ borderRadius: import("@alveole/theme").Radius;
14
+ outlineWidth?: number;
15
+ outlineStyle?: "solid";
16
+ outlineColor?: string;
17
+ outlineOffset?: number;
18
+ };
19
+ inputError: {
20
+ borderBottomColor: import("@alveole/theme").ThemeColor;
21
+ };
22
+ inputSuccess: {
23
+ borderBottomColor: import("@alveole/theme").ThemeColor;
24
+ };
25
+ inputDisabled: {
26
+ borderBottomColor: import("@alveole/theme").ThemeColor;
13
27
  };
14
28
  priceInputContainer: {
15
29
  display: "flex";
@@ -19,13 +33,14 @@ export declare const useStyles: () => {
19
33
  input: {
20
34
  outline: string;
21
35
  borderWidth: number;
36
+ backgroundColor: "transparent";
22
37
  textAlign: "center";
23
- color: string;
38
+ color: import("@alveole/theme").ThemeColor;
24
39
  fontFamily: string;
25
40
  fontSize: 64;
26
41
  };
27
42
  inputPlaceholder: {
28
- color: string;
43
+ color: import("@alveole/theme").ThemeColor;
29
44
  };
30
45
  inputDevise: {
31
46
  position: "relative";
@@ -35,7 +50,7 @@ export declare const useStyles: () => {
35
50
  letterSpacing: 0;
36
51
  fontFamily: string;
37
52
  fontWeight?: import("react-native").TextStyle["fontWeight"];
38
- color: string;
53
+ color: import("@alveole/theme").ThemeColor;
39
54
  marginTop: string;
40
55
  marginBottom: string;
41
56
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PriceInput.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCnB,CAAC"}
1
+ {"version":3,"file":"PriceInput.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { focusBorder, makeStyles } from '@alveole/theme';
2
- export const useStyles = makeStyles(({ text, color, spacing }) => ({
2
+ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
3
3
  container: {
4
4
  display: 'flex',
5
5
  flexDirection: 'column',
@@ -8,11 +8,23 @@ export const useStyles = makeStyles(({ text, color, spacing }) => ({
8
8
  borderBottomColor: color.light.border['plain-grey'],
9
9
  paddingBottom: spacing('1W'),
10
10
  },
11
- // Le champ de prix n'a qu'un trait sous le montant en guise de cadre : c'est donc lui que
12
- // le focus recolore, avec la meme definition que la bordure complete des autres champs.
13
- containerFocused: {
14
- borderBottomWidth: focusBorder().borderWidth,
15
- borderBottomColor: focusBorder().borderColor,
11
+ // Le champ de prix n'a qu'un trait sous le montant en guise de cadre : le focus le recolore,
12
+ // et l'anneau encastre des autres champs (ADR 0017) entoure la zone du montant.
13
+ inputFocused: (({ borderWidth, borderColor, ...anneau }) => ({
14
+ ...anneau,
15
+ borderBottomWidth: borderWidth,
16
+ borderBottomColor: borderColor,
17
+ // Au focus seulement : au repos, un rayon courberait les extremites du seul trait visible.
18
+ borderRadius: radius('md'),
19
+ }))(focusBorder()),
20
+ inputError: {
21
+ borderBottomColor: color.light.border['plain-error'],
22
+ },
23
+ inputSuccess: {
24
+ borderBottomColor: color.light.border['plain-success'],
25
+ },
26
+ inputDisabled: {
27
+ borderBottomColor: color.light.border['disabled-grey'],
16
28
  },
17
29
  priceInputContainer: {
18
30
  display: 'flex',
@@ -22,6 +34,8 @@ export const useStyles = makeStyles(({ text, color, spacing }) => ({
22
34
  input: {
23
35
  outline: 'none',
24
36
  borderWidth: 0,
37
+ // Le blanc par defaut d'un <input> recouvrirait l'anneau encastre du cadre.
38
+ backgroundColor: 'transparent',
25
39
  textAlign: 'center',
26
40
  color: color.light.text['title-grey'],
27
41
  fontFamily: text['Titres alternatifs'].MD.fontFamily,
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './PriceInput.css';
3
2
  export declare const PriceInput: React.ForwardRefExoticComponent<import("..").NumberInputProps & {
4
3
  autoFocus?: boolean;
5
4
  devise?: "\u20AC";
@@ -1 +1 @@
1
- {"version":3,"file":"PriceInput.web.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,kBAAkB,CAAC;AAK1B,eAAO,MAAM,UAAU;;;;0CAuCrB,CAAC"}
1
+ {"version":3,"file":"PriceInput.web.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/PriceInput.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,eAAO,MAAM,UAAU;;;;0CAuCrB,CAAC"}
@@ -4,22 +4,21 @@ import { Box } from '../../core/Box';
4
4
  import { Typography } from '../../core/Typography';
5
5
  import { useFieldId } from '../FormControl';
6
6
  import { useFieldFocus } from '../FormControl/useFieldFocus';
7
- import './PriceInput.css';
7
+ import { cadrePrix } from './cadrePrix';
8
+ import { largeurDuChamp } from './largeurDuChamp';
8
9
  import { useStyles } from './PriceInput.styles';
9
- const MAX_VALUE = 99999999;
10
+ import { useSaisieMontant } from './useSaisieMontant';
10
11
  export const PriceInput = React.forwardRef(function PriceInput(props, ref) {
11
- const { devise, autoFocus, value, disabled, readOnly, onChange } = props;
12
+ const { devise, autoFocus, value, disabled, readOnly, error, success, onChange } = props;
12
13
  const styles = useStyles();
13
14
  const champ = useFieldFocus({ disabled, readOnly });
14
- const numberLength = value ? String(value).length : 1;
15
- return (_jsx(Box, { tag: "price-input", style: { ...styles.container, ...(champ.focus ? styles.containerFocused : {}) }, children: _jsxs(Box, { tag: "price-input-container", style: styles.priceInputContainer, children: [_jsx("input", { ref: ref, id: useFieldId(), autoFocus: autoFocus, className: "alveole-price-input", style: {
15
+ const { affichage, saisir } = useSaisieMontant(value, onChange);
16
+ const largeur = largeurDuChamp(affichage);
17
+ return (_jsx(Box, { tag: "price-input", style: cadrePrix(styles, { focus: champ.focus, disabled, error, success }), children: _jsxs(Box, { tag: "price-input-container", style: styles.priceInputContainer, children: [_jsx("input", { ref: ref, id: useFieldId(), autoFocus: autoFocus, disabled: disabled, readOnly: readOnly, className: "alveole-price-input", style: {
16
18
  ...styles.input,
17
19
  fontVariantNumeric: 'tabular-nums',
18
- width: numberLength * 36,
20
+ width: largeur,
19
21
  lineHeight: 'inherit',
20
22
  maxWidth: '100%',
21
- }, value: value ?? '', placeholder: "0", onChange: e => {
22
- const newValue = e.target.value;
23
- onChange?.(newValue === '' ? null : Number(newValue));
24
- }, onFocus: champ.handleFocus, onBlur: champ.handleBlur, type: "number", max: MAX_VALUE }), _jsx(Typography, { style: styles.inputDevise, children: devise || '€' })] }) }));
23
+ }, value: affichage, placeholder: "0", onChange: e => saisir(e.target.value), onFocus: champ.handleFocus, onBlur: champ.handleBlur, type: "text", inputMode: "decimal" }), _jsx(Typography, { style: styles.inputDevise, children: devise || '€' })] }) }));
25
24
  });
@@ -0,0 +1,43 @@
1
+ import { FieldBorderState } from '../FormControl/fieldBorderState';
2
+ import { useStyles } from './PriceInput.styles';
3
+ type Styles = ReturnType<typeof useStyles>;
4
+ /**
5
+ * Le trait sous le montant tient lieu de cadre au champ de prix : il prend les etats de tous
6
+ * les champs, dans la priorite commune de l'ADR 0012.
7
+ */
8
+ export declare const cadrePrix: (styles: Styles, state: FieldBorderState) => {
9
+ borderBottomWidth: number;
10
+ borderBottomColor: string;
11
+ borderRadius?: import("@alveole/theme").Radius | undefined;
12
+ outlineWidth?: number | undefined;
13
+ outlineStyle?: "solid" | undefined;
14
+ outlineColor?: string | undefined;
15
+ outlineOffset?: number | undefined;
16
+ display: "flex";
17
+ flexDirection: "column";
18
+ width: "100%";
19
+ paddingBottom: string | number;
20
+ } | {
21
+ borderBottomColor: import("@alveole/theme").ThemeColor;
22
+ display: "flex";
23
+ flexDirection: "column";
24
+ width: "100%";
25
+ borderBottomWidth: number;
26
+ paddingBottom: string | number;
27
+ } | {
28
+ borderBottomColor: import("@alveole/theme").ThemeColor;
29
+ display: "flex";
30
+ flexDirection: "column";
31
+ width: "100%";
32
+ borderBottomWidth: number;
33
+ paddingBottom: string | number;
34
+ } | {
35
+ borderBottomColor: import("@alveole/theme").ThemeColor;
36
+ display: "flex";
37
+ flexDirection: "column";
38
+ width: "100%";
39
+ borderBottomWidth: number;
40
+ paddingBottom: string | number;
41
+ };
42
+ export {};
43
+ //# sourceMappingURL=cadrePrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cadrePrix.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/cadrePrix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAoB,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,EAAE,OAAO,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG/D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { fieldBorderState } from '../FormControl/fieldBorderState';
2
+ /**
3
+ * Le trait sous le montant tient lieu de cadre au champ de prix : il prend les etats de tous
4
+ * les champs, dans la priorite commune de l'ADR 0012.
5
+ */
6
+ export const cadrePrix = (styles, state) => ({
7
+ ...styles.container,
8
+ ...fieldBorderState(styles, state),
9
+ });
@@ -0,0 +1,2 @@
1
+ export declare const largeurDuChamp: (affichage: string) => string;
2
+ //# sourceMappingURL=largeurDuChamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"largeurDuChamp.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/largeurDuChamp.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,WAAiC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // Avec des chiffres tabulaires, un caractère occupe au plus 1 ch.
2
+ export const largeurDuChamp = (affichage) => `${affichage.length || 1}ch`;
@@ -0,0 +1,5 @@
1
+ export declare const useSaisieMontant: (montant: number | null | undefined, onChange?: (montant: number | null) => void) => {
2
+ affichage: string;
3
+ saisir: (texte: string) => void;
4
+ };
5
+ //# sourceMappingURL=useSaisieMontant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSaisieMontant.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/useSaisieMontant.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;oBAKvF,MAAM;CAO9B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { useState } from 'react';
2
+ // Des chiffres, puis au plus un séparateur décimal (virgule ou point) et deux décimales.
3
+ const MONTANT = /^\d*([.,]\d{0,2})?$/;
4
+ // La virgule est le séparateur décimal en français ; Number ne lit que le point.
5
+ const lireMontant = (texte) => (texte === '' ? null : Number(texte.replace(',', '.')));
6
+ // Le texte tapé reste affiché tant qu'il vaut le montant reçu : « 12, » attend sa décimale
7
+ // au lieu de redevenir « 12 ». Un montant imposé par le parent reprend la main.
8
+ export const useSaisieMontant = (montant, onChange) => {
9
+ const texteDuMontant = montant == null ? '' : String(montant);
10
+ const [saisie, setSaisie] = useState(texteDuMontant);
11
+ const affichage = lireMontant(saisie) === (montant ?? null) ? saisie : texteDuMontant;
12
+ const saisir = (texte) => {
13
+ if (!MONTANT.test(texte))
14
+ return;
15
+ setSaisie(texte);
16
+ onChange?.(lireMontant(texte));
17
+ };
18
+ return { affichage, saisir };
19
+ };
@@ -9,7 +9,7 @@ declare const _default: {
9
9
  progressed: {
10
10
  height: "100%";
11
11
  borderRadius: import("@alveole/theme").Radius;
12
- backgroundColor: string;
12
+ backgroundColor: import("@alveole/theme").ThemeColor;
13
13
  };
14
14
  progressedAbsolute: {
15
15
  position: "absolute";
@@ -17,10 +17,10 @@ declare const _default: {
17
17
  bottom: number;
18
18
  left: number;
19
19
  borderRadius: import("@alveole/theme").Radius;
20
- backgroundColor: string;
20
+ backgroundColor: import("@alveole/theme").ThemeColor;
21
21
  };
22
22
  progress: {
23
- backgroundColor: string;
23
+ backgroundColor: import("@alveole/theme").ThemeColor;
24
24
  width: "100%";
25
25
  borderRadius: import("@alveole/theme").Radius;
26
26
  overflow: "hidden";
@@ -32,10 +32,10 @@ declare const _default: {
32
32
  bottom: number;
33
33
  width: "100%";
34
34
  borderRadius: import("@alveole/theme").Radius;
35
- backgroundColor: string;
35
+ backgroundColor: import("@alveole/theme").ThemeColor;
36
36
  };
37
37
  indicator: {
38
- color: string;
38
+ color: import("@alveole/theme").ThemeColor;
39
39
  marginTop: string | number;
40
40
  marginLeft: string;
41
41
  marginRight: string;
@@ -58,7 +58,7 @@ declare const _default: {
58
58
  remaining: {
59
59
  height: "100%";
60
60
  borderRadius: import("@alveole/theme").Radius;
61
- backgroundColor: string;
61
+ backgroundColor: import("@alveole/theme").ThemeColor;
62
62
  };
63
63
  remainingAbsolute: {
64
64
  position: "absolute";
@@ -66,7 +66,7 @@ declare const _default: {
66
66
  bottom: number;
67
67
  right: number;
68
68
  borderRadius: import("@alveole/theme").Radius;
69
- backgroundColor: string;
69
+ backgroundColor: import("@alveole/theme").ThemeColor;
70
70
  };
71
71
  noRadius: {
72
72
  borderRadius: number;
@@ -2,7 +2,7 @@ export declare const useStyles: () => {
2
2
  progressed: {
3
3
  height: "100%";
4
4
  borderRadius: import("@alveole/theme").Radius;
5
- backgroundColor: string;
5
+ backgroundColor: import("@alveole/theme").ThemeColor;
6
6
  };
7
7
  progressedAbsolute: {
8
8
  position: "absolute";
@@ -10,10 +10,10 @@ export declare const useStyles: () => {
10
10
  bottom: number;
11
11
  left: number;
12
12
  borderRadius: import("@alveole/theme").Radius;
13
- backgroundColor: string;
13
+ backgroundColor: import("@alveole/theme").ThemeColor;
14
14
  };
15
15
  progress: {
16
- backgroundColor: string;
16
+ backgroundColor: import("@alveole/theme").ThemeColor;
17
17
  width: "100%";
18
18
  borderRadius: import("@alveole/theme").Radius;
19
19
  overflow: "hidden";
@@ -25,10 +25,10 @@ export declare const useStyles: () => {
25
25
  bottom: number;
26
26
  width: "100%";
27
27
  borderRadius: import("@alveole/theme").Radius;
28
- backgroundColor: string;
28
+ backgroundColor: import("@alveole/theme").ThemeColor;
29
29
  };
30
30
  indicator: {
31
- color: string;
31
+ color: import("@alveole/theme").ThemeColor;
32
32
  marginTop: string | number;
33
33
  marginLeft: string;
34
34
  marginRight: string;
@@ -51,7 +51,7 @@ export declare const useStyles: () => {
51
51
  remaining: {
52
52
  height: "100%";
53
53
  borderRadius: import("@alveole/theme").Radius;
54
- backgroundColor: string;
54
+ backgroundColor: import("@alveole/theme").ThemeColor;
55
55
  };
56
56
  remainingAbsolute: {
57
57
  position: "absolute";
@@ -59,7 +59,7 @@ export declare const useStyles: () => {
59
59
  bottom: number;
60
60
  right: number;
61
61
  borderRadius: import("@alveole/theme").Radius;
62
- backgroundColor: string;
62
+ backgroundColor: import("@alveole/theme").ThemeColor;
63
63
  };
64
64
  noRadius: {
65
65
  borderRadius: number;