@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
@@ -0,0 +1,17 @@
1
+ import { type ThemeProviderProps } from '@alveole/theme';
2
+ import React from 'react';
3
+ import { type TamaguiInternalConfig } from 'tamagui';
4
+ export type AlveoleProviderProps = React.PropsWithChildren<Omit<ThemeProviderProps, 'color' | 'children'> & {
5
+ /** Config Tamagui de l'application, qui porte aussi son `declare module 'tamagui'`. */
6
+ tamaguiConfig: TamaguiInternalConfig;
7
+ /** Surcharge partielle des couleurs Alveole, transmise au `ThemeProvider`. */
8
+ palette?: ThemeProviderProps['color'];
9
+ /** `false` pour une application qui monte déjà son propre `KeyboardProvider`. */
10
+ keyboardProvider?: boolean;
11
+ }>;
12
+ /**
13
+ * Monte la pile obligatoire dans l'ordre que les composants attendent (ADR 0034) : le Sheet
14
+ * de Tamagui v3 lit ses retraits dans `SafeAreaProvider`, qui enveloppe donc `TamaguiProvider`.
15
+ */
16
+ export declare const AlveoleProvider: (props: AlveoleProviderProps) => React.JSX.Element;
17
+ //# sourceMappingURL=AlveoleProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlveoleProvider.d.ts","sourceRoot":"","sources":["../../../src/core/AlveoleProvider/AlveoleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAmB,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGtE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CACxD,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC/C,uFAAuF;IACvF,aAAa,EAAE,qBAAqB,CAAC;IACrC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtC,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CACF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,sBAa1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ThemeProvider } from '@alveole/theme';
3
+ import { KeyboardProvider } from 'react-native-keyboard-controller';
4
+ import { initialWindowMetrics, SafeAreaProvider } from 'react-native-safe-area-context';
5
+ import { TamaguiProvider } from 'tamagui';
6
+ import { Toasts } from '../../ui/Toast';
7
+ /**
8
+ * Monte la pile obligatoire dans l'ordre que les composants attendent (ADR 0034) : le Sheet
9
+ * de Tamagui v3 lit ses retraits dans `SafeAreaProvider`, qui enveloppe donc `TamaguiProvider`.
10
+ */
11
+ export const AlveoleProvider = (props) => {
12
+ const { tamaguiConfig, palette, keyboardProvider = true, children, ...themeProps } = props;
13
+ const content = _jsx(Toasts, { children: children });
14
+ return (_jsx(SafeAreaProvider, { initialMetrics: initialWindowMetrics, children: _jsx(ThemeProvider, { ...themeProps, color: palette, children: _jsx(TamaguiProvider, { config: tamaguiConfig, defaultTheme: "light", children: keyboardProvider ? _jsx(KeyboardProvider, { children: content }) : content }) }) }));
15
+ };
@@ -0,0 +1,2 @@
1
+ export * from './AlveoleProvider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/AlveoleProvider/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './AlveoleProvider';
@@ -1,8 +1,12 @@
1
+ import type { HeadingLevel } from '../Heading';
1
2
  import type { TypographyProps } from '../Typography';
2
3
  export type AnchorHeadingProps = {
3
- children: string;
4
+ children: React.ReactNode;
4
5
  style?: TypographyProps['style'];
6
+ color?: TypographyProps['color'];
7
+ /** Sur le web, rend un `Heading` : vraie balise, taille et couleur de titre. */
8
+ as?: HeadingLevel;
5
9
  scrollMarginTop?: number;
6
10
  };
7
- export declare const AnchorHeading: ({ children, style }: AnchorHeadingProps) => import("react").JSX.Element;
11
+ export declare const AnchorHeading: ({ children, style, color }: AnchorHeadingProps) => import("react").JSX.Element;
8
12
  //# sourceMappingURL=AnchorHeading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorHeading.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,qBAAqB,kBAAkB,gCAEpE,CAAC"}
1
+ {"version":3,"file":"AnchorHeading.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,gFAAgF;IAChF,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,4BAA4B,kBAAkB,gCAI3E,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Typography } from '../Typography';
3
- export const AnchorHeading = ({ children, style }) => (_jsx(Typography, { style: style, children: children }));
3
+ export const AnchorHeading = ({ children, style, color }) => (_jsx(Typography, { style: style, color: color, children: children }));
@@ -4,10 +4,11 @@ declare const _default: {
4
4
  experimental: true;
5
5
  webOnly: true;
6
6
  description: string;
7
- component: ({ children, style }: import("./AnchorHeading").AnchorHeadingProps) => import("react").JSX.Element;
7
+ component: ({ children, style, color }: import("./AnchorHeading").AnchorHeadingProps) => import("react").JSX.Element;
8
8
  styleFn: () => {};
9
9
  };
10
10
  export default _default;
11
11
  export declare const Default: () => import("react").JSX.Element;
12
+ export declare const AvecNiveau: () => import("react").JSX.Element;
12
13
  export * as Sources from './AnchorHeading.stories.sources';
13
14
  //# sourceMappingURL=AnchorHeading.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorHeading.stories.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.stories.tsx"],"names":[],"mappings":";;;;;;;;;AAIA,wBAQkB;AAElB,eAAO,MAAM,OAAO,mCAGnB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"AnchorHeading.stories.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.stories.tsx"],"names":[],"mappings":";;;;;;;;;AAIA,wBAQkB;AAElB,eAAO,MAAM,OAAO,mCAGnB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAAmE,CAAC;AAE3F,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC"}
@@ -14,4 +14,5 @@ export const Default = () => {
14
14
  const { text } = useTheme();
15
15
  return _jsx(AnchorHeading, { style: text.Titres['H5 - XS'], children: "Mon exemple de titre" });
16
16
  };
17
+ export const AvecNiveau = () => _jsx(AnchorHeading, { as: "h2", children: "Titre h2 avec ancre" });
17
18
  export * as Sources from './AnchorHeading.stories.sources';
@@ -1,6 +1,8 @@
1
1
  export declare const Default: () => string;
2
+ export declare const AvecNiveau: () => string;
2
3
  export declare const storySources: {
3
4
  readonly Default: () => string;
5
+ readonly AvecNiveau: () => string;
4
6
  };
5
7
  export type StorySourceName = keyof typeof storySources;
6
8
  //# sourceMappingURL=AnchorHeading.stories.sources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorHeading.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA2K,CAAC;AAEhM,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"AnchorHeading.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA2K,CAAC;AAEhM,eAAO,MAAM,UAAU,cAAwG,CAAC;AAEhI,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/core/AnchorHeading/AnchorHeading.stories.tsx
3
3
  export const Default = () => "export const Default = () => {\n const { text } = useTheme();\n return <AnchorHeading style={text.Titres['H5 - XS']}>Mon exemple de titre</AnchorHeading>;\n};";
4
+ export const AvecNiveau = () => "export const AvecNiveau = () => <AnchorHeading as=\"h2\">Titre h2 avec ancre</AnchorHeading>;";
4
5
  export const storySources = {
5
6
  Default,
7
+ AvecNiveau,
6
8
  };
@@ -1,3 +1,3 @@
1
1
  import type { AnchorHeadingProps } from './AnchorHeading';
2
- export declare const AnchorHeading: ({ children, style, scrollMarginTop }: AnchorHeadingProps) => import("react").JSX.Element;
2
+ export declare const AnchorHeading: ({ children, style, color: couleur, as, scrollMarginTop }: AnchorHeadingProps) => import("react").JSX.Element;
3
3
  //# sourceMappingURL=AnchorHeading.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorHeading.web.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.web.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,eAAO,MAAM,aAAa,GAAI,sCAAsC,kBAAkB,gCAgDrF,CAAC"}
1
+ {"version":3,"file":"AnchorHeading.web.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/AnchorHeading.web.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,eAAO,MAAM,aAAa,GAAI,0DAA0D,kBAAkB,gCA0DzG,CAAC"}
@@ -2,9 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FOCUS_ATTRIBUTE, useTheme } from '@alveole/theme';
3
3
  import { useState } from 'react';
4
4
  import { LucideIcon } from '../../ui/LucideIcon';
5
+ import { Heading } from '../Heading';
5
6
  import { Typography } from '../Typography';
6
- import { toSlug } from './slug';
7
- export const AnchorHeading = ({ children, style, scrollMarginTop }) => {
7
+ import { texteDe, toSlug } from './slug';
8
+ export const AnchorHeading = ({ children, style, color: couleur, as, scrollMarginTop }) => {
8
9
  const { color } = useTheme();
9
10
  const [hovered, setHovered] = useState(false);
10
11
  const [iconHovered, setIconHovered] = useState(false);
@@ -12,14 +13,16 @@ export const AnchorHeading = ({ children, style, scrollMarginTop }) => {
12
13
  // Un state convient ici, contrairement a la bague : montrer le lien quelle que soit la
13
14
  // provenance du focus est inoffensif, l'afficher est precisement ce qu'on veut.
14
15
  const [focused, setFocused] = useState(false);
15
- const slug = toSlug(children);
16
+ const texte = texteDe(children);
17
+ // shortcut: deux titres identiques partagent le meme id, suffixer si une page en a besoin.
18
+ const slug = toSlug(texte);
16
19
  return (_jsxs("div", { id: slug, style: {
17
20
  display: 'flex',
18
21
  flexDirection: 'row',
19
22
  alignItems: 'center',
20
23
  gap: 6,
21
24
  ...(scrollMarginTop != null ? { scrollMarginTop } : null),
22
- }, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [_jsx(Typography, { style: style, children: children }), _jsx("a", { href: `#${slug}`, "aria-label": `Lien vers la section ${children}`, [FOCUS_ATTRIBUTE]: 'ring', style: {
25
+ }, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [as ? (_jsx(Heading, { as: as, style: style, color: couleur, children: children })) : (_jsx(Typography, { style: style, color: couleur, children: children })), _jsx("a", { href: `#${slug}`, "aria-label": `Lien vers la section ${texte}`, [FOCUS_ATTRIBUTE]: 'ring', style: {
23
26
  opacity: hovered || focused ? 1 : 0,
24
27
  transition: 'opacity 0.15s',
25
28
  display: 'flex',
@@ -1,6 +1,9 @@
1
+ import React from 'react';
1
2
  /**
2
3
  * L'ancre d'un titre. Extrait de AnchorHeading pour que ce qui pointe vers une ancre la
3
4
  * calcule de la meme facon : un sommaire qui slugifie autrement renvoie dans le vide.
4
5
  */
5
6
  export declare const toSlug: (value: string) => string;
7
+ /** Le texte brut d'un titre, gras ou code compris : de quoi en tirer l'ancre et le nom du lien. */
8
+ export declare const texteDe: (node: React.ReactNode) => string;
6
9
  //# sourceMappingURL=slug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/slug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,WAML,CAAC"}
1
+ {"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../../src/core/AnchorHeading/slug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,WAML,CAAC;AAEhC,mGAAmG;AACnG,eAAO,MAAM,OAAO,GAAI,MAAM,KAAK,CAAC,SAAS,KAAG,MAK/C,CAAC"}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  /**
2
3
  * L'ancre d'un titre. Extrait de AnchorHeading pour que ce qui pointe vers une ancre la
3
4
  * calcule de la meme facon : un sommaire qui slugifie autrement renvoie dans le vide.
@@ -8,3 +9,13 @@ export const toSlug = (value) => value
8
9
  .replace(/[̀-ͯ]/g, '')
9
10
  .replace(/\s+/g, '-')
10
11
  .replace(/[^a-z0-9-]/g, '');
12
+ /** Le texte brut d'un titre, gras ou code compris : de quoi en tirer l'ancre et le nom du lien. */
13
+ export const texteDe = (node) => {
14
+ if (typeof node === 'string' || typeof node === 'number')
15
+ return String(node);
16
+ if (Array.isArray(node))
17
+ return node.map(texteDe).join('');
18
+ if (React.isValidElement(node))
19
+ return texteDe(node.props.children);
20
+ return '';
21
+ };
@@ -5,24 +5,24 @@ export type BoxProps = Omit<TamaguiViewProps, keyof BoxStyle | 'tag' | 'style'>
5
5
  tag?: string;
6
6
  };
7
7
  export type BoxElement = TamaguiElement;
8
- export declare const Box: React.ForwardRefExoticComponent<Omit<TamaguiViewProps, "flex" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "opacity" | "display" | "flexDirection" | "flexWrap" | "overflow" | "gap" | "style" | "justify" | keyof import("../..").SizeStyle | "p" | "pl" | "pr" | "pt" | "pb" | "m" | "ml" | "mr" | "mt" | "mb" | "tag"> & Omit<RNTamaguiViewNonStyleProps, "tag"> & Pick<TamaguiViewProps, "flex" | "opacity" | "display" | "flexDirection" | "flexWrap" | "overflow"> & {
8
+ export declare const Box: React.ForwardRefExoticComponent<Omit<TamaguiViewProps, "flex" | "display" | "overflow" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "opacity" | "flexDirection" | "flexWrap" | "gap" | "style" | "justify" | keyof import("../..").SizeStyle | "p" | "pl" | "pr" | "pt" | "pb" | "m" | "ml" | "mr" | "mt" | "mb" | "tag"> & Omit<RNTamaguiViewNonStyleProps, "tag"> & Pick<TamaguiViewProps, "flex" | "display" | "overflow" | "opacity" | "flexDirection" | "flexWrap"> & {
9
9
  justify?: TamaguiViewProps["justifyContent"];
10
10
  } & import("../..").SizeStyle & {
11
- p?: number | import("@alveole/theme").SpacingKey;
12
- pl?: number | import("@alveole/theme").SpacingKey;
13
- pr?: number | import("@alveole/theme").SpacingKey;
14
- pt?: number | import("@alveole/theme").SpacingKey;
15
- pb?: number | import("@alveole/theme").SpacingKey;
16
- m?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
17
- ml?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
18
- mr?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
19
- mt?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
20
- mb?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
21
- backgroundColor?: TamaguiViewProps["backgroundColor"];
11
+ p?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
12
+ pl?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
13
+ pr?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
14
+ pt?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
15
+ pb?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
16
+ m?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
17
+ ml?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
18
+ mr?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
19
+ mt?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
20
+ mb?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
21
+ backgroundColor?: (import("@alveole/theme").ThemeColor | "transparent") | Partial<Record<"default" | "hover" | "press" | "focus" | "focusVisible" | "disabled", import("@alveole/theme").ThemeColor | "transparent">>;
22
22
  borderWidth?: TamaguiViewProps["borderWidth"];
23
- borderRadius?: number | string;
24
- borderColor?: TamaguiViewProps["borderColor"];
25
- gap?: number | import("@alveole/theme").SpacingKey;
23
+ borderRadius?: import("@alveole/theme").RadiusKey;
24
+ borderColor?: (import("@alveole/theme").ThemeColor | "transparent") | Partial<Record<"default" | "hover" | "press" | "focus" | "focusVisible" | "disabled", import("@alveole/theme").ThemeColor | "transparent">>;
25
+ gap?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
26
26
  } & {
27
27
  tag?: string;
28
28
  } & React.RefAttributes<TamaguiElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE1B,cAAc,EAEd,SAAS,IAAI,gBAAgB,EAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC,GAC7E,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,GACvC,QAAQ,GAAG;IAGT,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAGJ,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AAExC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;UANN,MAAM;wCAiDd,CAAC"}
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAE1B,cAAc,EAEd,SAAS,IAAI,gBAAgB,EAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOvC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC,GAC7E,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,GACvC,QAAQ,GAAG;IAGT,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAGJ,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AAExC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;UANN,MAAM;wCAkDd,CAAC"}
@@ -1,18 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RadiusList } from '@alveole/theme';
2
3
  import { styled, View as TamaguiView, } from '@tamagui/core';
3
4
  import React from 'react';
4
5
  import { aplatirStyle } from '../styleTamagui/aplatirStyle';
5
6
  import { definis } from '../styleTamagui/definis';
6
7
  import { correctionFlexDuWeb } from '../styleTamagui/flexDuWeb';
8
+ import { elementDuTag } from './elementDuTag';
7
9
  import { resolveSpacing } from './resolveSpacing';
8
10
  const StyledView = styled(TamaguiView, { name: 'Box' });
9
11
  export const Box = React.forwardRef(function Box(props, ref) {
10
12
  const { tag, style, borderRadius, mt, mb, mr, ml, m, pt, pb, pl, pr, p, gap, ...viewProps } = props;
13
+ const rayon = borderRadius && RadiusList[borderRadius];
11
14
  const radius = {
12
- borderBottomRightRadius: borderRadius,
13
- borderTopRightRadius: borderRadius,
14
- borderBottomLeftRadius: borderRadius,
15
- borderTopLeftRadius: borderRadius,
15
+ borderBottomRightRadius: rayon,
16
+ borderTopRightRadius: rayon,
17
+ borderBottomLeftRadius: rayon,
18
+ borderTopLeftRadius: rayon,
16
19
  };
17
20
  const margins = {
18
21
  mt: resolveSpacing(mt),
@@ -31,6 +34,6 @@ export const Box = React.forwardRef(function Box(props, ref) {
31
34
  const spacings = {
32
35
  gap: resolveSpacing(gap),
33
36
  };
34
- const correctionFlex = correctionFlexDuWeb(style);
35
- return (_jsx(StyledView, { ref: ref, render: tag ?? 'box', style: correctionFlex ? { ...aplatirStyle(style), ...correctionFlex } : style, ...radius, ...viewProps, ...definis(margins), ...definis(paddings), ...definis(spacings) }));
37
+ const correctionFlex = correctionFlexDuWeb(style, viewProps.flex);
38
+ return (_jsx(StyledView, { ref: ref, render: elementDuTag(tag), style: { ...aplatirStyle(style), ...correctionFlex }, ...radius, ...viewProps, ...definis(margins), ...definis(paddings), ...definis(spacings) }));
36
39
  });
@@ -4,24 +4,24 @@ declare const _default: {
4
4
  experimental: false;
5
5
  description: string;
6
6
  shortDescription: string;
7
- component: import("react").ForwardRefExoticComponent<Omit<import("tamagui").ViewProps, "flex" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "opacity" | "display" | "flexDirection" | "flexWrap" | "overflow" | "gap" | "style" | "justify" | keyof import("../..").SizeStyle | "p" | "pl" | "pr" | "pt" | "pb" | "m" | "ml" | "mr" | "mt" | "mb" | "tag"> & Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "tag"> & Pick<import("tamagui").ViewProps, "flex" | "opacity" | "display" | "flexDirection" | "flexWrap" | "overflow"> & {
7
+ component: import("react").ForwardRefExoticComponent<Omit<import("tamagui").ViewProps, "flex" | "display" | "overflow" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "opacity" | "flexDirection" | "flexWrap" | "gap" | "style" | "justify" | keyof import("../..").SizeStyle | "p" | "pl" | "pr" | "pt" | "pb" | "m" | "ml" | "mr" | "mt" | "mb" | "tag"> & Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "tag"> & Pick<import("tamagui").ViewProps, "flex" | "display" | "overflow" | "opacity" | "flexDirection" | "flexWrap"> & {
8
8
  justify?: import("tamagui").ViewProps["justifyContent"];
9
9
  } & import("../..").SizeStyle & {
10
- p?: number | import("@alveole/theme").SpacingKey;
11
- pl?: number | import("@alveole/theme").SpacingKey;
12
- pr?: number | import("@alveole/theme").SpacingKey;
13
- pt?: number | import("@alveole/theme").SpacingKey;
14
- pb?: number | import("@alveole/theme").SpacingKey;
15
- m?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
16
- ml?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
17
- mr?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
18
- mt?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
19
- mb?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
20
- backgroundColor?: import("tamagui").ViewProps["backgroundColor"];
10
+ p?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
11
+ pl?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
12
+ pr?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
13
+ pt?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
14
+ pb?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
15
+ m?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
16
+ ml?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
17
+ mr?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
18
+ mt?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
19
+ mb?: `${string}%` | ("0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W") | "auto";
20
+ backgroundColor?: (import("@alveole/theme").ThemeColor | "transparent") | Partial<Record<"default" | "hover" | "press" | "focus" | "focusVisible" | "disabled", import("@alveole/theme").ThemeColor | "transparent">>;
21
21
  borderWidth?: import("tamagui").ViewProps["borderWidth"];
22
- borderRadius?: number | string;
23
- borderColor?: import("tamagui").ViewProps["borderColor"];
24
- gap?: number | import("@alveole/theme").SpacingKey;
22
+ borderRadius?: import("@alveole/theme").RadiusKey;
23
+ borderColor?: (import("@alveole/theme").ThemeColor | "transparent") | Partial<Record<"default" | "hover" | "press" | "focus" | "focusVisible" | "disabled", import("@alveole/theme").ThemeColor | "transparent">>;
24
+ gap?: "0V" | "0,5V" | "1V" | "1,5V" | "1W" | "3V" | "2W" | "3W" | "4W" | "5W" | "6W" | "8W" | "12W" | "15W";
25
25
  } & {
26
26
  tag?: string;
27
27
  } & import("react").RefAttributes<import("tamagui").TamaguiElement>>;
@@ -32,5 +32,9 @@ export declare const BoxDefault: () => import("react").JSX.Element;
32
32
  export declare const BoxPadded: () => import("react").JSX.Element;
33
33
  export declare const BoxPaddedWithBackground: () => import("react").JSX.Element;
34
34
  export declare const BoxHovered: () => import("react").JSX.Element;
35
+ export declare const BoxSansTag: () => import("react").JSX.Element;
36
+ export declare const BoxFlexDansParentIndefini: () => import("react").JSX.Element;
37
+ export declare const BoxStyles: () => import("react").JSX.Element;
38
+ export declare const BoxTokens: () => import("react").JSX.Element;
35
39
  export * as Sources from './Box.stories.sources';
36
40
  //# sourceMappingURL=Box.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBASkB;AAElB,eAAO,MAAM,UAAU,mCAItB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAIrB,CAAC;AAEF,eAAO,MAAM,uBAAuB,mCAInC,CAAC;AAEF,eAAO,MAAM,UAAU,mCAItB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBASkB;AAElB,eAAO,MAAM,UAAU,mCAItB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAIrB,CAAC;AAEF,eAAO,MAAM,uBAAuB,mCAOnC,CAAC;AAEF,eAAO,MAAM,UAAU,mCAOtB,CAAC;AAGF,eAAO,MAAM,UAAU,mCAYtB,CAAC;AAGF,eAAO,MAAM,yBAAyB,mCAYrC,CAAC;AAGF,eAAO,MAAM,SAAS,mCAYrB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAMrB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC"}
@@ -1,4 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Spacings, useTheme } from '@alveole/theme';
2
3
  import { Typography } from '../Typography';
3
4
  import { Box } from './Box';
4
5
  export default {
@@ -11,7 +12,23 @@ export default {
11
12
  styleFn: () => 'Aucun style appliqué',
12
13
  };
13
14
  export const BoxDefault = () => (_jsx(Box, { tag: "box", children: _jsx(Typography, { children: "Contenu par d\u00E9faut" }) }));
14
- export const BoxPadded = () => (_jsx(Box, { tag: "padded", p: 16, children: _jsx(Typography, { children: "Box avec padding" }) }));
15
- export const BoxPaddedWithBackground = () => (_jsx(Box, { tag: "padded-with-background", backgroundColor: '#f0f0f0', p: 16, children: _jsx(Typography, { children: "Box avec fond gris clair et padding" }) }));
16
- export const BoxHovered = () => (_jsx(Box, { tag: "hovered", backgroundColor: "hover:#f0f0f0", children: _jsx(Typography, { children: "Box avec fond gris changeant au hover" }) }));
15
+ export const BoxPadded = () => (_jsx(Box, { tag: "padded", p: "2W", children: _jsx(Typography, { children: "Box avec padding" }) }));
16
+ export const BoxPaddedWithBackground = () => {
17
+ const { color } = useTheme();
18
+ return (_jsx(Box, { tag: "padded-with-background", backgroundColor: color.light.background['alt-grey'], p: "2W", children: _jsx(Typography, { children: "Box avec fond gris clair et padding" }) }));
19
+ };
20
+ export const BoxHovered = () => {
21
+ const { color } = useTheme();
22
+ return (_jsx(Box, { tag: "hovered", backgroundColor: { hover: color.light.background['alt-grey'] }, children: _jsx(Typography, { children: "Box avec fond gris changeant au hover" }) }));
23
+ };
24
+ // Sans tag, Box rend l'element inconnu <box> : il se met en page comme une div.
25
+ export const BoxSansTag = () => {
26
+ const { color } = useTheme();
27
+ return (_jsxs(Box, { tag: "box-comparaison", gap: "1W", children: [_jsx(Box, { backgroundColor: color.light.background['alt-grey'], p: "2W", children: _jsx(Typography, { children: "Box sans tag" }) }), _jsx(Box, { tag: "div", backgroundColor: color.light.background['alt-grey'], p: "2W", children: _jsx(Typography, { children: "Box en div" }) })] }));
28
+ };
29
+ // Dans un parent de hauteur indéfinie, `flex: 1` garde la hauteur de son contenu, en prop comme en style.
30
+ export const BoxFlexDansParentIndefini = () => (_jsxs(Box, { tag: "box-flex-parent", children: [_jsx(Box, { tag: "box-flex-en-prop", flex: 1, children: _jsx(Typography, { children: "flex: 1 en prop" }) }), _jsx(Box, { tag: "box-flex-en-style", style: { flex: 1 }, children: _jsx(Typography, { children: "flex: 1 en style" }) }), _jsx(Box, { tag: "box-flex-en-tableau", style: [{ flex: 1 }, { paddingLeft: Spacings['6W'] }], children: _jsx(Typography, { children: "flex: 1 en tableau, avec un autre style" }) })] }));
31
+ // Un style objet, en tableau ou en tableau imbriqué est fusionné avant d'atteindre le DOM.
32
+ export const BoxStyles = () => (_jsxs(Box, { gap: "1W", children: [_jsx(Box, { tag: "box-style-objet", style: { paddingLeft: Spacings['6W'] }, children: _jsx(Typography, { children: "Style objet" }) }), _jsx(Box, { tag: "box-style-tableau", style: [{ paddingLeft: Spacings['6W'] }, { marginTop: Spacings['0V'] }], children: _jsx(Typography, { children: "Style en tableau" }) }), _jsx(Box, { tag: "box-style-imbrique", style: [[{ paddingLeft: Spacings['6W'] }], { marginTop: Spacings['0V'] }], children: _jsx(Typography, { children: "Style en tableau imbriqu\u00E9" }) })] }));
33
+ export const BoxTokens = () => (_jsx(Box, { tag: "box-tokens-parent", width: 400, children: _jsx(Box, { tag: "box-tokens", width: 100, p: "2W", ml: "auto", mr: "10%", borderRadius: "md", children: _jsx(Typography, { children: "Tokens" }) }) }));
17
34
  export * as Sources from './Box.stories.sources';
@@ -2,11 +2,19 @@ export declare const BoxDefault: () => string;
2
2
  export declare const BoxPadded: () => string;
3
3
  export declare const BoxPaddedWithBackground: () => string;
4
4
  export declare const BoxHovered: () => string;
5
+ export declare const BoxSansTag: () => string;
6
+ export declare const BoxFlexDansParentIndefini: () => string;
7
+ export declare const BoxStyles: () => string;
8
+ export declare const BoxTokens: () => string;
5
9
  export declare const storySources: {
6
10
  readonly BoxDefault: () => string;
7
11
  readonly BoxPadded: () => string;
8
12
  readonly BoxPaddedWithBackground: () => string;
9
13
  readonly BoxHovered: () => string;
14
+ readonly BoxSansTag: () => string;
15
+ readonly BoxFlexDansParentIndefini: () => string;
16
+ readonly BoxStyles: () => string;
17
+ readonly BoxTokens: () => string;
10
18
  };
11
19
  export type StorySourceName = keyof typeof storySources;
12
20
  //# sourceMappingURL=Box.stories.sources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,cAAgI,CAAC;AAExJ,eAAO,MAAM,SAAS,cAAuI,CAAC;AAE9J,eAAO,MAAM,uBAAuB,cAAoN,CAAC;AAEzP,eAAO,MAAM,UAAU,cAAyL,CAAC;AAEjN,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"Box.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,cAAgI,CAAC;AAExJ,eAAO,MAAM,SAAS,cAAyI,CAAC;AAEhK,eAAO,MAAM,uBAAuB,cAAwS,CAAC;AAE7U,eAAO,MAAM,UAAU,cAAgR,CAAC;AAExS,eAAO,MAAM,UAAU,cAAub,CAAC;AAE/c,eAAO,MAAM,yBAAyB,cAA2f,CAAC;AAEliB,eAAO,MAAM,SAAS,cAAkjB,CAAC;AAEzkB,eAAO,MAAM,SAAS,cAAyP,CAAC;AAEhR,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -1,12 +1,20 @@
1
1
  // This file is generated. Do not edit manually.
2
2
  // Source: src/core/Box/Box.stories.tsx
3
3
  export const BoxDefault = () => "export const BoxDefault = () => (\n <Box tag=\"box\">\n <Typography>Contenu par défaut</Typography>\n </Box>\n);";
4
- export const BoxPadded = () => "export const BoxPadded = () => (\n <Box tag=\"padded\" p={16}>\n <Typography>Box avec padding</Typography>\n </Box>\n);";
5
- export const BoxPaddedWithBackground = () => "export const BoxPaddedWithBackground = () => (\n <Box tag=\"padded-with-background\" backgroundColor={'#f0f0f0'} p={16}>\n <Typography>Box avec fond gris clair et padding</Typography>\n </Box>\n);";
6
- export const BoxHovered = () => "export const BoxHovered = () => (\n <Box tag=\"hovered\" backgroundColor=\"hover:#f0f0f0\">\n <Typography>Box avec fond gris changeant au hover</Typography>\n </Box>\n);";
4
+ export const BoxPadded = () => "export const BoxPadded = () => (\n <Box tag=\"padded\" p=\"2W\">\n <Typography>Box avec padding</Typography>\n </Box>\n);";
5
+ export const BoxPaddedWithBackground = () => "export const BoxPaddedWithBackground = () => {\n const { color } = useTheme();\n return (\n <Box tag=\"padded-with-background\" backgroundColor={color.light.background['alt-grey']} p=\"2W\">\n <Typography>Box avec fond gris clair et padding</Typography>\n </Box>\n );\n};";
6
+ export const BoxHovered = () => "export const BoxHovered = () => {\n const { color } = useTheme();\n return (\n <Box tag=\"hovered\" backgroundColor={{ hover: color.light.background['alt-grey'] }}>\n <Typography>Box avec fond gris changeant au hover</Typography>\n </Box>\n );\n};";
7
+ export const BoxSansTag = () => "export const BoxSansTag = () => {\n const { color } = useTheme();\n return (\n <Box tag=\"box-comparaison\" gap=\"1W\">\n <Box backgroundColor={color.light.background['alt-grey']} p=\"2W\">\n <Typography>Box sans tag</Typography>\n </Box>\n <Box tag=\"div\" backgroundColor={color.light.background['alt-grey']} p=\"2W\">\n <Typography>Box en div</Typography>\n </Box>\n </Box>\n );\n};";
8
+ export const BoxFlexDansParentIndefini = () => "export const BoxFlexDansParentIndefini = () => (\n <Box tag=\"box-flex-parent\">\n <Box tag=\"box-flex-en-prop\" flex={1}>\n <Typography>flex: 1 en prop</Typography>\n </Box>\n <Box tag=\"box-flex-en-style\" style={{ flex: 1 }}>\n <Typography>flex: 1 en style</Typography>\n </Box>\n <Box tag=\"box-flex-en-tableau\" style={[{ flex: 1 }, { paddingLeft: Spacings['6W'] }]}>\n <Typography>flex: 1 en tableau, avec un autre style</Typography>\n </Box>\n </Box>\n);";
9
+ export const BoxStyles = () => "export const BoxStyles = () => (\n <Box gap=\"1W\">\n <Box tag=\"box-style-objet\" style={{ paddingLeft: Spacings['6W'] }}>\n <Typography>Style objet</Typography>\n </Box>\n <Box tag=\"box-style-tableau\" style={[{ paddingLeft: Spacings['6W'] }, { marginTop: Spacings['0V'] }]}>\n <Typography>Style en tableau</Typography>\n </Box>\n <Box tag=\"box-style-imbrique\" style={[[{ paddingLeft: Spacings['6W'] }], { marginTop: Spacings['0V'] }]}>\n <Typography>Style en tableau imbriqué</Typography>\n </Box>\n </Box>\n);";
10
+ export const BoxTokens = () => "export const BoxTokens = () => (\n <Box tag=\"box-tokens-parent\" width={400}>\n <Box tag=\"box-tokens\" width={100} p=\"2W\" ml=\"auto\" mr=\"10%\" borderRadius=\"md\">\n <Typography>Tokens</Typography>\n </Box>\n </Box>\n);";
7
11
  export const storySources = {
8
12
  BoxDefault,
9
13
  BoxPadded,
10
14
  BoxPaddedWithBackground,
11
15
  BoxHovered,
16
+ BoxSansTag,
17
+ BoxFlexDansParentIndefini,
18
+ BoxStyles,
19
+ BoxTokens,
12
20
  };
@@ -1,25 +1,31 @@
1
- import { SpacingKey } from '@alveole/theme';
1
+ import { RadiusKey, SpacingKey, ThemeColor } from '@alveole/theme';
2
2
  import { ViewProps } from '@tamagui/core';
3
3
  import { SizeStyle } from '../../type/SizeStyle';
4
+ type BoxSpacing = Exclude<SpacingKey, `${number}`>;
5
+ type BoxMargin = BoxSpacing | `${string}%` | 'auto';
6
+ type CouleurDeBox = ThemeColor | 'transparent';
7
+ type EtatTamagui = 'default' | 'hover' | 'press' | 'focus' | 'focusVisible' | 'disabled';
8
+ type BoxColor = CouleurDeBox | Partial<Record<EtatTamagui, CouleurDeBox>>;
4
9
  export type BoxBaseStyle = Pick<ViewProps, 'display' | 'flex' | 'flexWrap' | 'flexDirection' | 'opacity' | 'overflow'> & {
5
10
  justify?: ViewProps['justifyContent'];
6
11
  };
7
12
  export type BoxAdvancedStyle = SizeStyle & {
8
- p?: number | SpacingKey;
9
- pl?: number | SpacingKey;
10
- pr?: number | SpacingKey;
11
- pt?: number | SpacingKey;
12
- pb?: number | SpacingKey;
13
- m?: number | `${string}%` | SpacingKey | 'auto';
14
- ml?: number | `${string}%` | SpacingKey | 'auto';
15
- mr?: number | `${string}%` | SpacingKey | 'auto';
16
- mt?: number | `${string}%` | SpacingKey | 'auto';
17
- mb?: number | `${string}%` | SpacingKey | 'auto';
18
- backgroundColor?: ViewProps['backgroundColor'];
13
+ p?: BoxSpacing;
14
+ pl?: BoxSpacing;
15
+ pr?: BoxSpacing;
16
+ pt?: BoxSpacing;
17
+ pb?: BoxSpacing;
18
+ m?: BoxMargin;
19
+ ml?: BoxMargin;
20
+ mr?: BoxMargin;
21
+ mt?: BoxMargin;
22
+ mb?: BoxMargin;
23
+ backgroundColor?: BoxColor;
19
24
  borderWidth?: ViewProps['borderWidth'];
20
- borderRadius?: number | string;
21
- borderColor?: ViewProps['borderColor'];
22
- gap?: number | SpacingKey;
25
+ borderRadius?: RadiusKey;
26
+ borderColor?: BoxColor;
27
+ gap?: BoxSpacing;
23
28
  };
24
29
  export type BoxStyle = BoxBaseStyle & BoxAdvancedStyle;
30
+ export {};
25
31
  //# sourceMappingURL=Box.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.types.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,SAAS,EACT,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,GAAG,UAAU,CAC3E,GAAG;IACF,OAAO,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG;IACzC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAEzB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IAChD,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IACjD,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IACjD,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IACjD,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IAGjD,eAAe,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"Box.types.d.ts","sourceRoot":"","sources":["../../../src/core/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AACnD,KAAK,SAAS,GAAG,UAAU,GAAG,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC;AAEpD,KAAK,YAAY,GAAG,UAAU,GAAG,aAAa,CAAC;AAC/C,KAAK,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC;AAIzF,KAAK,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,SAAS,EACT,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,GAAG,UAAU,CAC3E,GAAG;IACF,OAAO,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG;IACzC,CAAC,CAAC,EAAE,UAAU,CAAC;IACf,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,EAAE,CAAC,EAAE,UAAU,CAAC;IAEhB,CAAC,CAAC,EAAE,SAAS,CAAC;IACd,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IAEf,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,GAAG,CAAC,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const elementDuTag: (tag: string | undefined) => string;
2
+ //# sourceMappingURL=elementDuTag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementDuTag.d.ts","sourceRoot":"","sources":["../../../src/core/Box/elementDuTag.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,GAAG,SAAS,WAOnD,CAAC"}
@@ -0,0 +1,12 @@
1
+ // Un nom d'element invalide fait lever `createElement` au DOM et tomber tout le rendu.
2
+ const NOM_D_ELEMENT = /^[a-z][a-z0-9-]*$/;
3
+ export const elementDuTag = (tag) => {
4
+ if (tag === undefined)
5
+ return 'box';
6
+ if (NOM_D_ELEMENT.test(tag))
7
+ return tag;
8
+ if (__DEV__) {
9
+ console.warn('Warning:', `Box : le tag "${tag}" n'est pas un nom d'element en minuscules, rendu en <box>.`);
10
+ }
11
+ return 'box';
12
+ };
@@ -12,11 +12,11 @@ declare const _default: {
12
12
  paddingTop: number;
13
13
  paddingBottom: number;
14
14
  borderRadius: import("@alveole/theme").Radius;
15
- color: string;
15
+ color: import("@alveole/theme").ThemeColor;
16
16
  fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
17
17
  };
18
18
  codeText: {
19
- color: string;
19
+ color: import("@alveole/theme").ThemeColor;
20
20
  fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
21
21
  };
22
22
  codeSurface: {
@@ -12,5 +12,5 @@ export default {
12
12
  styleFn: useStyles,
13
13
  };
14
14
  export const Basic = () => (_jsx(Box, { children: _jsxs(Typography, { children: ["La balise ", _jsx(Code, { children: '<Code>' }), " doit \u00EAtre comprise dans une balise ", _jsx(Code, { children: '<Typography>' })] }) }));
15
- export const InText = () => (_jsx(Box, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 24, children: [_jsxs(Typography, { children: ["Le fichier CSV doit avoir une ", _jsx(Code, { children: "," }), " comme s\u00E9parateur de colonnes."] }), _jsxs(Typography, { children: ["Exemple : ", _jsx(Code, { children: "Individuel" }), " ou ", _jsx(Code, { children: "Collectif" })] })] }) }));
15
+ export const InText = () => (_jsx(Box, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsxs(Typography, { children: ["Le fichier CSV doit avoir une ", _jsx(Code, { children: "," }), " comme s\u00E9parateur de colonnes."] }), _jsxs(Typography, { children: ["Exemple : ", _jsx(Code, { children: "Individuel" }), " ou ", _jsx(Code, { children: "Collectif" })] })] }) }));
16
16
  export * as Sources from './Code.stories.sources';
@@ -1 +1 @@
1
- {"version":3,"file":"Code.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,cAA6M,CAAC;AAEhO,eAAO,MAAM,MAAM,cAAoX,CAAC;AAExY,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"Code.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,cAA6M,CAAC;AAEhO,eAAO,MAAM,MAAM,cAAsX,CAAC;AAE1Y,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -1,7 +1,7 @@
1
1
  // This file is generated. Do not edit manually.
2
2
  // Source: src/core/Code/Code.stories.tsx
3
3
  export const Basic = () => "export const Basic = () => (\n <Box>\n <Typography>\n La balise <Code>{'<Code>'}</Code> doit être comprise dans une balise <Code>{'<Typography>'}</Code>\n </Typography>\n </Box>\n);";
4
- export const InText = () => "export const InText = () => (\n <Box>\n <Box display=\"flex\" flexDirection=\"column\" gap={24}>\n <Typography>\n Le fichier CSV doit avoir une <Code>,</Code> comme séparateur de colonnes.\n </Typography>\n <Typography>\n Exemple : <Code>Individuel</Code> ou <Code>Collectif</Code>\n </Typography>\n </Box>\n </Box>\n);";
4
+ export const InText = () => "export const InText = () => (\n <Box>\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <Typography>\n Le fichier CSV doit avoir une <Code>,</Code> comme séparateur de colonnes.\n </Typography>\n <Typography>\n Exemple : <Code>Individuel</Code> ou <Code>Collectif</Code>\n </Typography>\n </Box>\n </Box>\n);";
5
5
  export const storySources = {
6
6
  Basic,
7
7
  InText,