@alveole/components 2.0.0-alpha.1 → 2.0.0-alpha.11
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.
- package/dist/core/A/A.d.ts +3 -1
- package/dist/core/A/A.d.ts.map +1 -1
- package/dist/core/A/A.js +6 -3
- package/dist/core/Box/Box.d.ts +8 -8
- package/dist/core/Box/Box.d.ts.map +1 -1
- package/dist/core/Box/Box.js +6 -3
- package/dist/core/Box/Box.stories.d.ts +5 -5
- package/dist/core/Box/Box.stories.js +1 -1
- package/dist/core/Box/Box.stories.sources.d.ts.map +1 -1
- package/dist/core/Box/Box.stories.sources.js +1 -1
- package/dist/core/Box/Box.types.d.ts +3 -3
- package/dist/core/Box/Box.types.d.ts.map +1 -1
- package/dist/core/Form/Form.web.d.ts.map +1 -1
- package/dist/core/Form/Form.web.js +4 -1
- package/dist/core/Grid/Grid.stories.d.ts +4 -4
- package/dist/core/Highlight/Highlight.d.ts.map +1 -1
- package/dist/core/Highlight/Highlight.js +5 -2
- package/dist/core/Highlight/Highlight.styles.d.ts.map +1 -1
- package/dist/core/Highlight/Highlight.styles.js +2 -1
- package/dist/core/Map/useGoogleMap.d.ts +2 -1
- package/dist/core/Map/useGoogleMap.d.ts.map +1 -1
- package/dist/core/Map/useGoogleMap.js +3 -2
- package/dist/core/MarkdownDescription/MarkdownDescription.d.ts.map +1 -1
- package/dist/core/MarkdownDescription/MarkdownDescription.js +5 -11
- package/dist/core/MarkdownDescription/markdownComponents.d.ts +1 -7
- package/dist/core/MarkdownDescription/markdownComponents.d.ts.map +1 -1
- package/dist/core/MarkdownDescription/markdownComponents.js +3 -2
- package/dist/core/MarkdownDescription/markdownNatif.d.ts +13 -0
- package/dist/core/MarkdownDescription/markdownNatif.d.ts.map +1 -0
- package/dist/core/MarkdownDescription/markdownNatif.js +73 -0
- package/dist/core/Page/Page.stories.d.ts +5 -0
- package/dist/core/Page/Page.stories.d.ts.map +1 -1
- package/dist/core/Page/Page.stories.js +5 -0
- package/dist/core/Page/Page.stories.sources.d.ts +2 -0
- package/dist/core/Page/Page.stories.sources.d.ts.map +1 -1
- package/dist/core/Page/Page.stories.sources.js +3 -0
- package/dist/core/Page/Page.types.d.ts +1 -0
- package/dist/core/Page/Page.types.d.ts.map +1 -1
- package/dist/core/Page/PageBackground.d.ts +5 -5
- package/dist/core/Page/PageBackground.d.ts.map +1 -1
- package/dist/core/Page/PageBackground.js +8 -5
- package/dist/core/Page/PageBackground.stories.d.ts +25 -0
- package/dist/core/Page/PageBackground.stories.d.ts.map +1 -0
- package/dist/core/Page/PageBackground.stories.js +28 -0
- package/dist/core/Page/PageBackground.stories.sources.d.ts +8 -0
- package/dist/core/Page/PageBackground.stories.sources.d.ts.map +1 -0
- package/dist/core/Page/PageBackground.stories.sources.js +8 -0
- package/dist/core/Page/PageContent.js +2 -2
- package/dist/core/Page/PageContentDefault.d.ts.map +1 -1
- package/dist/core/Page/PageContentDefault.js +1 -1
- package/dist/core/Page/PageContentScrollable.d.ts +6 -5
- package/dist/core/Page/PageContentScrollable.d.ts.map +1 -1
- package/dist/core/Page/PageContentScrollable.js +1 -1
- package/dist/core/Page/index.d.ts +1 -0
- package/dist/core/Page/index.d.ts.map +1 -1
- package/dist/core/Page/index.js +1 -0
- package/dist/core/Typography/Typography.d.ts +5 -5
- package/dist/core/Typography/Typography.d.ts.map +1 -1
- package/dist/core/Typography/Typography.js +16 -4
- package/dist/core/Typography/Typography.stories.d.ts +2 -2
- package/dist/core/Typography/couleurDuTexte.d.ts +1 -1
- package/dist/core/Typography/couleurDuTexte.d.ts.map +1 -1
- package/dist/core/UpdateRequired/UpdateRequired.d.ts.map +1 -1
- package/dist/core/UpdateRequired/UpdateRequired.js +4 -1
- package/dist/core/animation/animer.d.ts +9 -0
- package/dist/core/animation/animer.d.ts.map +1 -0
- package/dist/core/animation/animer.js +5 -0
- package/dist/core/styleTamagui/aplatirStyle.d.ts +2 -0
- package/dist/core/styleTamagui/aplatirStyle.d.ts.map +1 -0
- package/dist/core/styleTamagui/aplatirStyle.js +9 -0
- package/dist/core/styleTamagui/definis.d.ts +4 -0
- package/dist/core/styleTamagui/definis.d.ts.map +1 -0
- package/dist/core/styleTamagui/definis.js +3 -0
- package/dist/core/styleTamagui/flexDuWeb.d.ts +23 -0
- package/dist/core/styleTamagui/flexDuWeb.d.ts.map +1 -0
- package/dist/core/styleTamagui/flexDuWeb.js +19 -0
- package/dist/core/styleTamagui/fondAuSurvol.d.ts +14 -0
- package/dist/core/styleTamagui/fondAuSurvol.d.ts.map +1 -0
- package/dist/core/styleTamagui/fondAuSurvol.js +8 -0
- package/dist/core/styleTamagui/sansEstompage.d.ts +4 -0
- package/dist/core/styleTamagui/sansEstompage.d.ts.map +1 -0
- package/dist/core/styleTamagui/sansEstompage.js +4 -0
- package/dist/core/styleTamagui/soulignement.d.ts +11 -0
- package/dist/core/styleTamagui/soulignement.d.ts.map +1 -0
- package/dist/core/styleTamagui/soulignement.js +5 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.d.ts.map +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/pdfjs/pdf.min.mjs +4 -5
- package/dist/pdfjs/pdf.worker.min.mjs +4 -5
- package/dist/stories/index.d.ts +1 -0
- package/dist/stories/index.d.ts.map +1 -1
- package/dist/stories/index.js +1 -0
- package/dist/ui/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/ui/Accordion/AccordionItem.js +2 -1
- package/dist/ui/ActionMenu/ActionMenuItem.d.ts.map +1 -1
- package/dist/ui/ActionMenu/ActionMenuItem.js +5 -5
- package/dist/ui/Avatar/Avatar.d.ts.map +1 -1
- package/dist/ui/Avatar/Avatar.js +6 -1
- package/dist/ui/Badge/Badge.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.js +3 -2
- package/dist/ui/Badge/Badge.stories.d.ts +16 -12
- package/dist/ui/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.styles.d.ts +16 -12
- package/dist/ui/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.styles.js +4 -2
- package/dist/ui/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/ui/BottomSheet/BottomSheet.js +2 -1
- package/dist/ui/BottomSheet/BottomSheet.stories.d.ts +6 -4
- package/dist/ui/BottomSheet/BottomSheet.stories.d.ts.map +1 -1
- package/dist/ui/BottomSheet/BottomSheet.styles.d.ts +6 -4
- package/dist/ui/BottomSheet/BottomSheet.styles.d.ts.map +1 -1
- package/dist/ui/BottomSheet/BottomSheet.styles.js +6 -4
- package/dist/ui/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/ui/Breadcrumbs/Breadcrumbs.js +2 -1
- package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts +5 -4
- package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts +5 -4
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.js +1 -4
- package/dist/ui/Button/Button.d.ts.map +1 -1
- package/dist/ui/Button/Button.js +22 -2
- package/dist/ui/Button/Button.stories.d.ts +12 -0
- package/dist/ui/Button/Button.stories.d.ts.map +1 -1
- package/dist/ui/Button/Button.stories.js +24 -4
- package/dist/ui/Button/Button.stories.sources.d.ts +2 -0
- package/dist/ui/Button/Button.stories.sources.d.ts.map +1 -1
- package/dist/ui/Button/Button.stories.sources.js +6 -3
- package/dist/ui/Button/Button.types.d.ts +4 -0
- package/dist/ui/Button/Button.types.d.ts.map +1 -1
- package/dist/ui/Button/ButtonContent.d.ts.map +1 -1
- package/dist/ui/Button/ButtonContent.js +7 -3
- package/dist/ui/Button/buttonIconStyling.d.ts +2 -2
- package/dist/ui/Button/buttonStyling.d.ts +9 -3
- package/dist/ui/Button/buttonStyling.d.ts.map +1 -1
- package/dist/ui/Button/buttonStyling.js +7 -3
- package/dist/ui/Card/Card.stories.d.ts.map +1 -1
- package/dist/ui/Card/Card.stories.js +3 -2
- package/dist/ui/Card/Card.stories.sources.d.ts.map +1 -1
- package/dist/ui/Card/Card.stories.sources.js +2 -2
- package/dist/ui/Checkbox/Checkbox.d.ts +6 -6
- package/dist/ui/Checkbox/Checkbox.stories.d.ts +7 -7
- package/dist/ui/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/ui/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/ui/Checkbox/Checkbox.styles.js +3 -4
- package/dist/ui/Checkbox/CheckboxContainer.d.ts +6 -6
- package/dist/ui/Checkbox/CheckboxContainer.d.ts.map +1 -1
- package/dist/ui/Checkbox/CheckboxContainer.js +4 -8
- package/dist/ui/Checkbox/CheckboxLabel.d.ts +1 -1
- package/dist/ui/Checkbox/CheckboxLabel.d.ts.map +1 -1
- package/dist/ui/Checkbox/CheckboxLabel.js +2 -2
- package/dist/ui/DataTable/DataTable.demo.deployments.js +1 -1
- package/dist/ui/DataTable/DataTable.stories.d.ts +3 -1
- package/dist/ui/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/ui/DataTable/DataTable.styles.d.ts +3 -1
- package/dist/ui/DataTable/DataTable.styles.d.ts.map +1 -1
- package/dist/ui/DataTable/DataTable.styles.js +5 -1
- package/dist/ui/DataTable/DataTableCell.js +1 -1
- package/dist/ui/DataTable/DataTableRow.d.ts.map +1 -1
- package/dist/ui/DataTable/DataTableRow.js +4 -2
- package/dist/ui/DataTable/dataTableCellStyle.d.ts +2 -2
- package/dist/ui/DataTable/dataTableCellStyle.js +1 -1
- package/dist/ui/DateInput/DateInput.d.ts +2 -2
- package/dist/ui/DateInput/DateInput.d.ts.map +1 -1
- package/dist/ui/DateInput/DateInput.ios.d.ts +2 -2
- package/dist/ui/DateInput/DateInput.stories.d.ts +2 -2
- package/dist/ui/DateInput/DateInput.web.d.ts +2 -2
- package/dist/ui/DocumentViewer/DocumentViewer.stories.d.ts +1 -0
- package/dist/ui/DocumentViewer/DocumentViewer.stories.d.ts.map +1 -1
- package/dist/ui/DocumentViewer/DocumentViewer.stories.js +1 -1
- package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.d.ts.map +1 -1
- package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.js +1 -1
- package/dist/ui/DocumentViewer/DocumentViewer.styles.d.ts +1 -0
- package/dist/ui/DocumentViewer/DocumentViewer.styles.d.ts.map +1 -1
- package/dist/ui/DocumentViewer/DocumentViewer.styles.js +3 -0
- package/dist/ui/DocumentViewer/DocumentViewerImage.d.ts.map +1 -1
- package/dist/ui/DocumentViewer/pointeurWeb.d.ts +13 -3
- package/dist/ui/DocumentViewer/pointeurWeb.d.ts.map +1 -1
- package/dist/ui/DocumentViewer/pointeurWeb.js +1 -1
- package/dist/ui/DocumentViewer/useSurvolAvecZoom.d.ts +2 -2
- package/dist/ui/DocumentViewer/useSurvolAvecZoom.d.ts.map +1 -1
- package/dist/ui/EmptyState/EmptyState.stories.d.ts +1 -2
- package/dist/ui/EmptyState/EmptyState.stories.d.ts.map +1 -1
- package/dist/ui/EmptyState/EmptyState.stories.js +1 -1
- package/dist/ui/EmptyState/EmptyState.stories.sources.d.ts.map +1 -1
- package/dist/ui/EmptyState/EmptyState.stories.sources.js +1 -1
- package/dist/ui/EmptyState/EmptyState.styles.d.ts +1 -2
- package/dist/ui/EmptyState/EmptyState.styles.d.ts.map +1 -1
- package/dist/ui/EmptyState/EmptyState.styles.js +3 -2
- package/dist/ui/FilterDate/FilterDate.d.ts +1 -1
- package/dist/ui/FilterDate/FilterDate.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControl.stories.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControl.stories.js +3 -2
- package/dist/ui/FormControl/FormControl.stories.sources.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControl.stories.sources.js +1 -1
- package/dist/ui/Header/Header.d.ts.map +1 -1
- package/dist/ui/Header/Header.js +1 -1
- package/dist/ui/Header/Header.stories.d.ts +3 -30
- package/dist/ui/Header/Header.stories.d.ts.map +1 -1
- package/dist/ui/Header/Header.styles.d.ts +3 -30
- package/dist/ui/Header/Header.styles.d.ts.map +1 -1
- package/dist/ui/Header/Header.styles.js +5 -5
- package/dist/ui/Link/Link.d.ts.map +1 -1
- package/dist/ui/Link/Link.js +2 -1
- package/dist/ui/Link/Link.stories.d.ts +0 -4
- package/dist/ui/Link/Link.stories.d.ts.map +1 -1
- package/dist/ui/Link/Link.styles.d.ts +0 -4
- package/dist/ui/Link/Link.styles.d.ts.map +1 -1
- package/dist/ui/Link/Link.styles.js +0 -4
- package/dist/ui/ListItem/ListItem.d.ts.map +1 -1
- package/dist/ui/ListItem/ListItem.js +2 -1
- package/dist/ui/ListItem/ListItem.stories.d.ts +4 -2
- package/dist/ui/ListItem/ListItem.stories.d.ts.map +1 -1
- package/dist/ui/ListItem/ListItem.styles.d.ts +4 -2
- package/dist/ui/ListItem/ListItem.styles.d.ts.map +1 -1
- package/dist/ui/ListItem/ListItem.styles.js +6 -2
- package/dist/ui/LucideIcon/catalogueLucide.d.ts +171 -0
- package/dist/ui/LucideIcon/catalogueLucide.d.ts.map +1 -1
- package/dist/ui/LucideIcon/vendor/lab.js +1 -1
- package/dist/ui/LucideIcon/vendor/lucide.d.ts +2613 -1920
- package/dist/ui/LucideIcon/vendor/lucide.js +3 -3
- package/dist/ui/Popover/Popover.d.ts.map +1 -1
- package/dist/ui/Popover/Popover.js +1 -1
- package/dist/ui/ProgressBar/ProgressBar.stories.d.ts +1 -0
- package/dist/ui/ProgressBar/ProgressBar.stories.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.styles.d.ts +1 -0
- package/dist/ui/ProgressBar/ProgressBar.styles.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.styles.js +2 -0
- package/dist/ui/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/ui/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioGroup.stories.d.ts +2 -4
- package/dist/ui/RadioGroup/RadioGroup.stories.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioGroup.styles.d.ts +1 -3
- package/dist/ui/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioGroup.styles.js +3 -6
- package/dist/ui/RadioGroup/RadioGroupCard.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioGroupCard.js +2 -2
- package/dist/ui/RadioGroup/RadioGroupItem.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioGroupItem.js +2 -2
- package/dist/ui/RadioGroup/RadioInput.d.ts.map +1 -1
- package/dist/ui/RadioGroup/RadioInput.js +5 -7
- package/dist/ui/RadioGroup/index.d.ts +1 -1
- package/dist/ui/Select/Select.types.d.ts +2 -0
- package/dist/ui/Select/Select.types.d.ts.map +1 -1
- package/dist/ui/Select/SelectBottomSheet.js +2 -2
- package/dist/ui/Select/SelectItem.js +1 -1
- package/dist/ui/Select/SelectList.styles.d.ts +1 -9
- package/dist/ui/Select/SelectList.styles.d.ts.map +1 -1
- package/dist/ui/Select/SelectList.styles.js +5 -6
- package/dist/ui/Select/SelectOptionsList.d.ts +1 -0
- package/dist/ui/Select/SelectOptionsList.d.ts.map +1 -1
- package/dist/ui/Select/selectItemStyle.d.ts +4 -4
- package/dist/ui/Select/selectItemStyle.d.ts.map +1 -1
- package/dist/ui/Select/selectItemStyle.js +7 -3
- package/dist/ui/Select/useDefilementVersSelection.d.ts +3 -2
- package/dist/ui/Select/useDefilementVersSelection.d.ts.map +1 -1
- package/dist/ui/Sidebar/Sidebar.stories.d.ts +0 -7
- package/dist/ui/Sidebar/Sidebar.stories.d.ts.map +1 -1
- package/dist/ui/Sidebar/Sidebar.styles.d.ts +0 -7
- package/dist/ui/Sidebar/Sidebar.styles.d.ts.map +1 -1
- package/dist/ui/Sidebar/Sidebar.styles.js +0 -3
- package/dist/ui/Sidebar/SidebarItem.d.ts.map +1 -1
- package/dist/ui/Sidebar/SidebarItem.js +13 -9
- package/dist/ui/Signature/Signature.d.ts +1 -1
- package/dist/ui/Signature/Signature.d.ts.map +1 -1
- package/dist/ui/Skeleton/Skeleton.stories.d.ts +1 -0
- package/dist/ui/Skeleton/Skeleton.stories.d.ts.map +1 -1
- package/dist/ui/Skeleton/Skeleton.styles.d.ts +1 -0
- package/dist/ui/Skeleton/Skeleton.styles.d.ts.map +1 -1
- package/dist/ui/Skeleton/Skeleton.styles.js +2 -0
- package/dist/ui/Switch/Switch.d.ts +1 -1
- package/dist/ui/Switch/Switch.d.ts.map +1 -1
- package/dist/ui/Switch/Switch.js +11 -8
- package/dist/ui/Switch/Switch.stories.d.ts +3 -2
- package/dist/ui/Switch/Switch.stories.d.ts.map +1 -1
- package/dist/ui/Switch/Switch.styles.d.ts +2 -1
- package/dist/ui/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/ui/Switch/Switch.styles.js +5 -4
- package/dist/ui/Tabs/Tabs.d.ts +1 -1
- package/dist/ui/Tabs/Tabs.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.js +1 -1
- package/dist/ui/Tabs/Tabs.stories.d.ts +26 -5
- package/dist/ui/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.styles.d.ts +26 -5
- package/dist/ui/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.styles.js +6 -2
- package/dist/ui/Tabs/TabsTab.js +1 -1
- package/dist/ui/Tabs/useTabsState.d.ts +1 -1
- package/dist/ui/Tabs/useTabsState.d.ts.map +1 -1
- package/dist/ui/Tabs/useTabsState.js +7 -4
- package/dist/ui/Toast/Toast.d.ts +3 -3
- package/dist/ui/Toast/Toast.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.js +5 -7
- package/dist/ui/Toast/Toast.stories.d.ts +10 -7
- package/dist/ui/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.stories.js +12 -9
- package/dist/ui/Toast/Toast.stories.sources.js +1 -1
- package/dist/ui/Toast/ToastContext.d.ts +1 -0
- package/dist/ui/Toast/ToastContext.d.ts.map +1 -1
- package/dist/ui/Toast/ToastContext.js +1 -0
- package/dist/ui/Toast/Toasts.d.ts +2 -1
- package/dist/ui/Toast/Toasts.d.ts.map +1 -1
- package/dist/ui/Toast/Toasts.js +9 -5
- package/dist/ui/ToolbarTop/toolbarTopStyling.d.ts +2 -2
- package/package.json +30 -28
- package/dist/core/styleTamagui/versStyleTamagui.d.ts +0 -10
- package/dist/core/styleTamagui/versStyleTamagui.d.ts.map +0 -1
- package/dist/core/styleTamagui/versStyleTamagui.js +0 -8
- package/dist/ui/Toast/ToastBridge.d.ts +0 -11
- package/dist/ui/Toast/ToastBridge.d.ts.map +0 -1
- package/dist/ui/Toast/ToastBridge.js +0 -19
package/dist/core/A/A.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Href } from 'expo-router';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
+
import { BoxProps } from '../Box';
|
|
3
4
|
import { CibleDuLien } from './ouvertureDuLien';
|
|
4
5
|
export type CanAccessHref = (href: Href & string) => boolean;
|
|
5
6
|
/** Contexte optionnel pour fournir la logique d'accès aux liens (ex. droits métier). Non fourni = tous les liens sont cliquables. */
|
|
@@ -11,7 +12,8 @@ export type AProps = React.PropsWithChildren<{
|
|
|
11
12
|
/** default: "push" */
|
|
12
13
|
direction?: 'push' | 'replace' | 'dismiss';
|
|
13
14
|
style?: CSSProperties;
|
|
14
|
-
|
|
15
|
+
/** Fond du lien, clauses de Tamagui comprises (`{ hover: ... }`, ADR 0031). */
|
|
16
|
+
backgroundColor?: BoxProps['backgroundColor'];
|
|
15
17
|
/** Override la logique d'accès (sinon utilise LinkAccessContext si fourni, sinon accès autorisé). */
|
|
16
18
|
canAccessHref?: CanAccessHref;
|
|
17
19
|
/** Marque le lien comme représentant l'emplacement courant. "page" pour la page affichée. */
|
package/dist/core/A/A.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A.d.ts","sourceRoot":"","sources":["../../../src/core/A/A.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAQ,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,EAAE,aAAa,EAA6B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"A.d.ts","sourceRoot":"","sources":["../../../src/core/A/A.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAQ,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,EAAE,aAAa,EAA6B,MAAM,OAAO,CAAC;AAExE,OAAO,EAAO,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAmB,MAAM,mBAAmB,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC;AAE7D,qIAAqI;AACrI,eAAO,MAAM,iBAAiB,qCAA4C,CAAC;AAE3E,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,aAAa,KAAG,aAGhE,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC3C,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC9C,qGAAqG;IACrG,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7D,gIAAgI;IAChI,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,CAAC,GAAI,OAAO,MAAM,sBAqE9B,CAAC"}
|
package/dist/core/A/A.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { focusRingProps } from '@alveole/theme';
|
|
3
3
|
import { Link } from 'expo-router';
|
|
4
4
|
import { createContext, useContext } from 'react';
|
|
5
|
-
import { Pressable } from 'react-native';
|
|
5
|
+
import { Platform, Pressable } from 'react-native';
|
|
6
6
|
import { Box } from '../Box';
|
|
7
7
|
import { GridColumnContext } from '../Grid';
|
|
8
8
|
import { useStyles } from './A.styles';
|
|
@@ -15,7 +15,7 @@ export const useCanAccessHref = (canAccessProp) => {
|
|
|
15
15
|
return canAccessProp ?? canAccessFromContext ?? (() => true);
|
|
16
16
|
};
|
|
17
17
|
export const A = (props) => {
|
|
18
|
-
const { children, href, direction = 'push', style,
|
|
18
|
+
const { children, href, direction = 'push', style, backgroundColor, ariaCurrent, target, canAccessHref: canAccessProp, } = props;
|
|
19
19
|
const styles = useStyles();
|
|
20
20
|
// Sur le web, ce Pressable rend le `<a>` lui-meme : il porte donc une couleur de texte, que
|
|
21
21
|
// `ViewStyle` ne connait pas. `TextStyle` l'etend et la decrit.
|
|
@@ -23,7 +23,10 @@ export const A = (props) => {
|
|
|
23
23
|
const canAccess = useCanAccessHref(canAccessProp);
|
|
24
24
|
const fill = useContext(GridColumnContext) ? styles.fill : undefined;
|
|
25
25
|
const { navigateurIntegre, propsDuPressable, annonce } = ouvertureDuLien(href, target);
|
|
26
|
-
const contenu = (_jsxs(Box, { tag: "a-pressable", style: { ...styles.pressable, ...fill, ...style },
|
|
26
|
+
const contenu = (_jsxs(Box, { tag: "a-pressable", style: { ...styles.pressable, ...fill, ...style }, backgroundColor: backgroundColor,
|
|
27
|
+
// En natif, les clauses de survol des descendants ne doivent pas capter le toucher
|
|
28
|
+
// destiné au Pressable du lien. Le web garde ses interactions et son survol.
|
|
29
|
+
pointerEvents: Platform.OS === 'web' ? 'auto' : 'none', children: [children, annonce] }));
|
|
27
30
|
const lienNavigateurIntegre = (_jsx(Pressable, { accessibilityRole: "link", "aria-current": ariaCurrent, ...propsDuPressable, style: { ...styleDuLien, ...fill }, ...focusRingProps(), children: contenu }));
|
|
28
31
|
const expoLink = (_jsx(Link, { href: href, asChild: true, replace: direction === 'replace', push: direction === 'push', dismissTo: direction === 'dismiss', children: _jsx(Pressable, { accessibilityRole: "link", "aria-current": ariaCurrent, ...propsDuPressable, style: { ...styleDuLien, ...fill }, ...focusRingProps(), children: contenu }) }));
|
|
29
32
|
if (!canAccess(href))
|
package/dist/core/Box/Box.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RNTamaguiViewNonStyleProps, TamaguiElement, ViewProps as TamaguiViewProps } from '@tamagui/core';
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { BoxStyle } from './Box.types';
|
|
4
|
-
export type BoxProps =
|
|
5
|
-
|
|
4
|
+
export type BoxProps = Omit<TamaguiViewProps, keyof BoxStyle | 'tag' | 'style'> & Omit<RNTamaguiViewNonStyleProps, 'tag'> & BoxStyle & {
|
|
5
|
+
tag?: string;
|
|
6
6
|
};
|
|
7
7
|
export type BoxElement = TamaguiElement;
|
|
8
|
-
export declare const Box: React.ForwardRefExoticComponent<
|
|
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"> & {
|
|
9
9
|
justify?: TamaguiViewProps["justifyContent"];
|
|
10
10
|
} & import("../..").SizeStyle & {
|
|
11
11
|
p?: number | import("@alveole/theme").SpacingKey;
|
|
@@ -18,12 +18,12 @@ export declare const Box: React.ForwardRefExoticComponent<Pick<import("tamagui")
|
|
|
18
18
|
mr?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
19
19
|
mt?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
20
20
|
mb?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
21
|
-
backgroundColor?:
|
|
22
|
-
borderWidth?:
|
|
21
|
+
backgroundColor?: TamaguiViewProps["backgroundColor"];
|
|
22
|
+
borderWidth?: TamaguiViewProps["borderWidth"];
|
|
23
23
|
borderRadius?: number | string;
|
|
24
|
-
borderColor?:
|
|
24
|
+
borderColor?: TamaguiViewProps["borderColor"];
|
|
25
25
|
gap?: number | import("@alveole/theme").SpacingKey;
|
|
26
26
|
} & {
|
|
27
|
-
|
|
27
|
+
tag?: string;
|
|
28
28
|
} & React.RefAttributes<TamaguiElement>>;
|
|
29
29
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -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,
|
|
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"}
|
package/dist/core/Box/Box.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { styled, View as TamaguiView, } from '@tamagui/core';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { aplatirStyle } from '../styleTamagui/aplatirStyle';
|
|
5
|
+
import { definis } from '../styleTamagui/definis';
|
|
6
|
+
import { correctionFlexDuWeb } from '../styleTamagui/flexDuWeb';
|
|
5
7
|
import { resolveSpacing } from './resolveSpacing';
|
|
6
8
|
const StyledView = styled(TamaguiView, { name: 'Box' });
|
|
7
9
|
export const Box = React.forwardRef(function Box(props, ref) {
|
|
8
|
-
const { tag, style, borderRadius,
|
|
10
|
+
const { tag, style, borderRadius, mt, mb, mr, ml, m, pt, pb, pl, pr, p, gap, ...viewProps } = props;
|
|
9
11
|
const radius = {
|
|
10
12
|
borderBottomRightRadius: borderRadius,
|
|
11
13
|
borderTopRightRadius: borderRadius,
|
|
@@ -29,5 +31,6 @@ export const Box = React.forwardRef(function Box(props, ref) {
|
|
|
29
31
|
const spacings = {
|
|
30
32
|
gap: resolveSpacing(gap),
|
|
31
33
|
};
|
|
32
|
-
|
|
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) }));
|
|
33
36
|
});
|
|
@@ -4,7 +4,7 @@ declare const _default: {
|
|
|
4
4
|
experimental: false;
|
|
5
5
|
description: string;
|
|
6
6
|
shortDescription: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<
|
|
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"> & {
|
|
8
8
|
justify?: import("tamagui").ViewProps["justifyContent"];
|
|
9
9
|
} & import("../..").SizeStyle & {
|
|
10
10
|
p?: number | import("@alveole/theme").SpacingKey;
|
|
@@ -17,13 +17,13 @@ declare const _default: {
|
|
|
17
17
|
mr?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
18
18
|
mt?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
19
19
|
mb?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
20
|
-
backgroundColor?:
|
|
21
|
-
borderWidth?:
|
|
20
|
+
backgroundColor?: import("tamagui").ViewProps["backgroundColor"];
|
|
21
|
+
borderWidth?: import("tamagui").ViewProps["borderWidth"];
|
|
22
22
|
borderRadius?: number | string;
|
|
23
|
-
borderColor?:
|
|
23
|
+
borderColor?: import("tamagui").ViewProps["borderColor"];
|
|
24
24
|
gap?: number | import("@alveole/theme").SpacingKey;
|
|
25
25
|
} & {
|
|
26
|
-
|
|
26
|
+
tag?: string;
|
|
27
27
|
} & import("react").RefAttributes<import("tamagui").TamaguiElement>>;
|
|
28
28
|
styleFn: () => string;
|
|
29
29
|
};
|
|
@@ -13,5 +13,5 @@ export default {
|
|
|
13
13
|
export const BoxDefault = () => (_jsx(Box, { tag: "box", children: _jsx(Typography, { children: "Contenu par d\u00E9faut" }) }));
|
|
14
14
|
export const BoxPadded = () => (_jsx(Box, { tag: "padded", p: 16, children: _jsx(Typography, { children: "Box avec padding" }) }));
|
|
15
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",
|
|
16
|
+
export const BoxHovered = () => (_jsx(Box, { tag: "hovered", backgroundColor: "hover:#f0f0f0", children: _jsx(Typography, { children: "Box avec fond gris changeant au hover" }) }));
|
|
17
17
|
export * as Sources from './Box.stories.sources';
|
|
@@ -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,
|
|
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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const BoxDefault = () => "export const BoxDefault = () => (\n <Box tag=\"box\">\n <Typography>Contenu par défaut</Typography>\n </Box>\n);";
|
|
4
4
|
export const BoxPadded = () => "export const BoxPadded = () => (\n <Box tag=\"padded\" p={16}>\n <Typography>Box avec padding</Typography>\n </Box>\n);";
|
|
5
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\"
|
|
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);";
|
|
7
7
|
export const storySources = {
|
|
8
8
|
BoxDefault,
|
|
9
9
|
BoxPadded,
|
|
@@ -15,10 +15,10 @@ export type BoxAdvancedStyle = SizeStyle & {
|
|
|
15
15
|
mr?: number | `${string}%` | SpacingKey | 'auto';
|
|
16
16
|
mt?: number | `${string}%` | SpacingKey | 'auto';
|
|
17
17
|
mb?: number | `${string}%` | SpacingKey | 'auto';
|
|
18
|
-
backgroundColor?:
|
|
19
|
-
borderWidth?:
|
|
18
|
+
backgroundColor?: ViewProps['backgroundColor'];
|
|
19
|
+
borderWidth?: ViewProps['borderWidth'];
|
|
20
20
|
borderRadius?: number | string;
|
|
21
|
-
borderColor?:
|
|
21
|
+
borderColor?: ViewProps['borderColor'];
|
|
22
22
|
gap?: number | SpacingKey;
|
|
23
23
|
};
|
|
24
24
|
export type BoxStyle = BoxBaseStyle & BoxAdvancedStyle;
|
|
@@ -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;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.web.d.ts","sourceRoot":"","sources":["../../../src/core/Form/Form.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Form.web.d.ts","sourceRoot":"","sources":["../../../src/core/Form/Form.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,sBAgBpC,CAAC"}
|
|
@@ -9,7 +9,10 @@ export const Form = (props) => {
|
|
|
9
9
|
const webFormProps = {
|
|
10
10
|
onSubmit: (e) => {
|
|
11
11
|
e.preventDefault();
|
|
12
|
-
const
|
|
12
|
+
const form = formRef.current;
|
|
13
|
+
if (!(form instanceof HTMLElement))
|
|
14
|
+
return;
|
|
15
|
+
const button = form.querySelector('button[role="button"][aria-selected="true"]');
|
|
13
16
|
if (button instanceof HTMLElement)
|
|
14
17
|
button.click();
|
|
15
18
|
},
|
|
@@ -4,7 +4,7 @@ declare const _default: {
|
|
|
4
4
|
experimental: false;
|
|
5
5
|
description: string;
|
|
6
6
|
shortDescription: string;
|
|
7
|
-
component: ((props: Pick<import("..").BoxProps, "
|
|
7
|
+
component: ((props: Pick<import("..").BoxProps, "gap" | "children"> & import("../..").SizeStyle & {
|
|
8
8
|
p?: number | import("@alveole/theme").SpacingKey;
|
|
9
9
|
pl?: number | import("@alveole/theme").SpacingKey;
|
|
10
10
|
pr?: number | import("@alveole/theme").SpacingKey;
|
|
@@ -15,10 +15,10 @@ declare const _default: {
|
|
|
15
15
|
mr?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
16
16
|
mt?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
17
17
|
mb?: number | `${string}%` | import("@alveole/theme").SpacingKey | "auto";
|
|
18
|
-
backgroundColor?:
|
|
19
|
-
borderWidth?:
|
|
18
|
+
backgroundColor?: import("tamagui").ViewProps["backgroundColor"];
|
|
19
|
+
borderWidth?: import("tamagui").ViewProps["borderWidth"];
|
|
20
20
|
borderRadius?: number | string;
|
|
21
|
-
borderColor?:
|
|
21
|
+
borderColor?: import("tamagui").ViewProps["borderColor"];
|
|
22
22
|
gap?: number | import("@alveole/theme").SpacingKey;
|
|
23
23
|
}) => import("react").JSX.Element) & {
|
|
24
24
|
Column: (props: import("./Grid").GridColumnProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Highlight.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMvE,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IACtE,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACjF,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACrC,CAAC;AAMF,eAAO,MAAM,SAAS,GAAI,wCAAuD,cAAc,
|
|
1
|
+
{"version":3,"file":"Highlight.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMvE,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IACtE,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACjF,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACrC,CAAC;AAMF,eAAO,MAAM,SAAS,GAAI,wCAAuD,cAAc,sBA2E9F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
4
4
|
// Le type est importé en `import type` : il est effacé à l'exécution, donc l'index du
|
|
5
5
|
// paquet, qui charge aussi toute la moitié highlight.js, n'est jamais évalué.
|
|
6
6
|
import { CustomPalette, focusRingProps } from '@alveole/theme';
|
|
@@ -32,7 +32,10 @@ export const Highlight = ({ children, language, style, variant = 'standalone' })
|
|
|
32
32
|
}
|
|
33
33
|
return acc;
|
|
34
34
|
}, []);
|
|
35
|
-
const renderer = ({ rows }) => (_jsx(ScrollView, { horizontal: true, focusable: true,
|
|
35
|
+
const renderer = ({ rows }) => (_jsx(ScrollView, { horizontal: true, focusable: true,
|
|
36
|
+
// En natif, ScrollView grandit par défaut. Dans la page défilante du catalogue,
|
|
37
|
+
// le code doit garder sa hauteur de contenu au lieu de remplir la hauteur disponible.
|
|
38
|
+
style: Platform.OS === 'web' ? undefined : { flexGrow: 0, flexShrink: 0 }, ...focusRingProps(),
|
|
36
39
|
// `styles.highlight` pose `overflow: scroll`, ce qui ferait défiler le conteneur de
|
|
37
40
|
// contenu en doublon du `ScrollView` qui l'entoure. C'est ce doublon intérieur qu'axe
|
|
38
41
|
// signalait : il défile sans pouvoir recevoir le focus, que porte l'extérieur.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Highlight.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Highlight.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAsBpB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
2
3
|
export const useStyles = makeStyles(({ color, radius, spacingValue }) => {
|
|
3
4
|
const base = {
|
|
4
5
|
overflow: 'scroll',
|
|
5
|
-
padding: spacingValue('2W'),
|
|
6
|
+
padding: spacingValue(Platform.OS === 'web' ? '2W' : '1W'),
|
|
6
7
|
width: '100%',
|
|
7
8
|
backgroundColor: color.light.background['alt-grey'],
|
|
8
9
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { TamaguiElement } from 'tamagui';
|
|
2
3
|
import { GoogleNamespace } from './googleMaps.types';
|
|
3
4
|
import { LatLng, MapProps } from './Map.props';
|
|
4
5
|
declare global {
|
|
@@ -8,6 +9,6 @@ declare global {
|
|
|
8
9
|
}
|
|
9
10
|
export declare const shouldFitToMarkers: (fitToMarkers: boolean | undefined, center: LatLng | undefined, markersCount: number) => boolean;
|
|
10
11
|
export declare function useGoogleMap(props: MapProps): {
|
|
11
|
-
containerRef: React.RefObject<
|
|
12
|
+
containerRef: React.RefObject<TamaguiElement | null>;
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=useGoogleMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGoogleMap.d.ts","sourceRoot":"","sources":["../../../src/core/Map/useGoogleMap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2B,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAU,MAAM,aAAa,CAAC;AAEvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,CAAC,EAAE,eAAe,CAAC;KAC1B;CACF;AAqCD,eAAO,MAAM,kBAAkB,GAC7B,cAAc,OAAO,GAAG,SAAS,EACjC,QAAQ,MAAM,GAAG,SAAS,EAC1B,cAAc,MAAM,KACnB,OAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"useGoogleMap.d.ts","sourceRoot":"","sources":["../../../src/core/Map/useGoogleMap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAA2B,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAU,MAAM,aAAa,CAAC;AAEvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,CAAC,EAAE,eAAe,CAAC;KAC1B;CACF;AAqCD,eAAO,MAAM,kBAAkB,GAC7B,cAAc,OAAO,GAAG,SAAS,EACjC,QAAQ,MAAM,GAAG,SAAS,EAC1B,cAAc,MAAM,KACnB,OAAwD,CAAC;AAsH5D,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ;;EAuC3C"}
|
|
@@ -89,13 +89,14 @@ function useMapInit({ containerRef, mapRef, center, markers, zoom, mapOptions, r
|
|
|
89
89
|
await loadGoogleMaps();
|
|
90
90
|
if (cancelled)
|
|
91
91
|
return;
|
|
92
|
-
|
|
92
|
+
const container = containerRef.current;
|
|
93
|
+
if (!(container instanceof HTMLElement))
|
|
93
94
|
return;
|
|
94
95
|
const google = window.google;
|
|
95
96
|
if (!google?.maps)
|
|
96
97
|
throw new Error('Google Maps not available on window');
|
|
97
98
|
const initialCenter = center ?? markers[0]?.position ?? { lat: 48.8566, lng: 2.3522 };
|
|
98
|
-
mapRef.current = new google.maps.Map(
|
|
99
|
+
mapRef.current = new google.maps.Map(container, {
|
|
99
100
|
center: initialCenter,
|
|
100
101
|
zoom,
|
|
101
102
|
clickableIcons: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownDescription.d.ts","sourceRoot":"","sources":["../../../src/core/MarkdownDescription/MarkdownDescription.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,wCAA+C,wBAAwB,
|
|
1
|
+
{"version":3,"file":"MarkdownDescription.d.ts","sourceRoot":"","sources":["../../../src/core/MarkdownDescription/MarkdownDescription.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,wCAA+C,wBAAwB,sBAkD1G,CAAC"}
|
|
@@ -2,16 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTheme } from '@alveole/theme';
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { Box } from '../Box';
|
|
5
|
-
import { Typography } from '../Typography';
|
|
6
5
|
import { createMarkdownComponents } from './markdownComponents';
|
|
6
|
+
import { createNativeMarkdownComponents, preparerMarkdownNatif } from './markdownNatif';
|
|
7
7
|
import { replierLesCoupuresDeLigne } from './replierLesCoupuresDeLigne';
|
|
8
8
|
export const MarkdownDescription = ({ children, taille = 'MD', color: textColor }) => {
|
|
9
9
|
const { text, color } = useTheme();
|
|
10
10
|
const bodyStyle = text['Corps de texte'][taille].Regular;
|
|
11
11
|
const boldStyle = text['Corps de texte'][taille].Bold;
|
|
12
|
-
if (Platform.OS !== 'web') {
|
|
13
|
-
return (_jsx(Typography, { style: bodyStyle, color: textColor, children: children }));
|
|
14
|
-
}
|
|
15
12
|
const ReactMarkdown = require('react-markdown').default;
|
|
16
13
|
const remarkGfm = require('remark-gfm').default;
|
|
17
14
|
const borderColor = color.light.border['default-grey'];
|
|
@@ -24,9 +21,7 @@ export const MarkdownDescription = ({ children, taille = 'MD', color: textColor
|
|
|
24
21
|
// de la couleur) exige qu'un lien au milieu d'un bloc de texte se distingue de son
|
|
25
22
|
// entourage par autre chose que sa seule couleur.
|
|
26
23
|
const linkColor = color.light.text['default-info'];
|
|
27
|
-
const
|
|
28
|
-
const linkHoverStyle = { textDecoration: 'none' };
|
|
29
|
-
const components = createMarkdownComponents({
|
|
24
|
+
const styles = {
|
|
30
25
|
bodyStyle,
|
|
31
26
|
boldStyle,
|
|
32
27
|
textColor,
|
|
@@ -35,8 +30,7 @@ export const MarkdownDescription = ({ children, taille = 'MD', color: textColor
|
|
|
35
30
|
borderColor,
|
|
36
31
|
headerBg,
|
|
37
32
|
linkColor,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
return (_jsx(Box, { tag: "markdown-description", display: "flex", gap: 8, children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm, replierLesCoupuresDeLigne], components: components, children: children }) }));
|
|
33
|
+
};
|
|
34
|
+
const components = Platform.OS === 'web' ? createMarkdownComponents(styles) : createNativeMarkdownComponents(styles);
|
|
35
|
+
return (_jsx(Box, { tag: "markdown-description", display: "flex", gap: 8, children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm, replierLesCoupuresDeLigne], rehypePlugins: Platform.OS === 'web' ? [] : [preparerMarkdownNatif], skipHtml: Platform.OS !== 'web', components: components, children: children }) }));
|
|
42
36
|
};
|
|
@@ -8,7 +8,7 @@ type AvecEnfants = {
|
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
};
|
|
10
10
|
type TextStyle = Pick<RNTextStyle, 'fontSize' | 'lineHeight' | 'fontWeight' | 'fontFamily' | 'letterSpacing'>;
|
|
11
|
-
type MarkdownComponentsStyles = {
|
|
11
|
+
export type MarkdownComponentsStyles = {
|
|
12
12
|
bodyStyle: TextStyle;
|
|
13
13
|
boldStyle: TextStyle;
|
|
14
14
|
/** Couleur du texte courant, hors titres et liens. Vide garde le gris par defaut. */
|
|
@@ -19,12 +19,6 @@ type MarkdownComponentsStyles = {
|
|
|
19
19
|
borderColor: string;
|
|
20
20
|
headerBg: string;
|
|
21
21
|
linkColor: string;
|
|
22
|
-
linkStyle: {
|
|
23
|
-
textDecoration: 'underline';
|
|
24
|
-
};
|
|
25
|
-
linkHoverStyle: {
|
|
26
|
-
textDecoration: 'none';
|
|
27
|
-
};
|
|
28
22
|
};
|
|
29
23
|
type TextComponentStyles = Pick<MarkdownComponentsStyles, 'bodyStyle' | 'boldStyle' | 'textColor'>;
|
|
30
24
|
export declare const createTextComponents: ({ bodyStyle, boldStyle, textColor }: TextComponentStyles) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdownComponents.d.ts","sourceRoot":"","sources":["../../../src/core/MarkdownDescription/markdownComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"markdownComponents.d.ts","sourceRoot":"","sources":["../../../src/core/MarkdownDescription/markdownComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAczD,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,cAAc,CAAC,UAAU,CAG7E,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;AAClD,KAAK,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC;AAE9G,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;IAChC,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,mBAAmB,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC,CAAC;AAEnG,eAAO,MAAM,oBAAoB,GAAI,qCAAqC,mBAAmB;yBACtE,WAAW;8BAKN,WAAW;0BAKf,WAAW;CAKjC,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,YAAY,MAAM;0BACnE,WAAW;0BAKX,WAAW;0BAKX,WAAW;0BAKX,WAAW;CAKjC,CAAC;AA+HH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,wBAAwB,KAAG,UAQ1E,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { FOCUS_ATTRIBUTE } from '@alveole/theme';
|
|
|
3
3
|
import { Box } from '../Box';
|
|
4
4
|
import { Code } from '../Code';
|
|
5
5
|
import { Highlight } from '../Highlight';
|
|
6
|
+
import { soulignementDuLien } from '../styleTamagui/soulignement';
|
|
6
7
|
import { Typography } from '../Typography';
|
|
7
8
|
const HIGHLIGHT_LANGUAGES = [
|
|
8
9
|
'json',
|
|
@@ -33,8 +34,8 @@ const createListComponents = (bodyStyle) => ({
|
|
|
33
34
|
ol: ({ children: c }) => (_jsx(Box, { display: "flex", gap: 4, children: c })),
|
|
34
35
|
li: ({ children: c }) => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 8, style: { alignItems: 'flex-start' }, children: [_jsx(Typography, { style: bodyStyle, children: '•' }), _jsx(Typography, { style: [bodyStyle, { flex: 1 }], children: c })] })),
|
|
35
36
|
});
|
|
36
|
-
const createLinkComponents = ({ linkColor
|
|
37
|
-
a: ({ href, children: c }) => (_jsx(Typography, { tag: "a",
|
|
37
|
+
const createLinkComponents = ({ linkColor }) => ({
|
|
38
|
+
a: ({ href, children: c }) => (_jsx(Typography, { tag: "a", color: linkColor, textDecorationLine: soulignementDuLien, href, [FOCUS_ATTRIBUTE]: 'ring', children: c })),
|
|
38
39
|
});
|
|
39
40
|
const createBlockComponents = (borderColor) => ({
|
|
40
41
|
pre: ({ children: c }) => _jsx(Box, { display: "flex", children: c }),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Components } from 'react-markdown';
|
|
2
|
+
import { MarkdownComponentsStyles } from './markdownComponents';
|
|
3
|
+
type Noeud = {
|
|
4
|
+
type: string;
|
|
5
|
+
tagName?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
properties?: Record<string, string | number | boolean>;
|
|
8
|
+
children?: Noeud[];
|
|
9
|
+
};
|
|
10
|
+
export declare const preparerMarkdownNatif: () => (noeud: Noeud) => void;
|
|
11
|
+
export declare const createNativeMarkdownComponents: (styles: MarkdownComponentsStyles) => Components;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=markdownNatif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdownNatif.d.ts","sourceRoot":"","sources":["../../../src/core/MarkdownDescription/markdownNatif.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,OAAO,EAA4B,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE1F,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;CACpB,CAAC;AAwCF,eAAO,MAAM,qBAAqB,gBAjBT,KAAK,KAAG,IAiBkB,CAAC;AAuBpD,eAAO,MAAM,8BAA8B,GAAI,QAAQ,wBAAwB,KAAG,UAwChF,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Linking } from 'react-native';
|
|
3
|
+
import { Box } from '../Box';
|
|
4
|
+
import { Typography } from '../Typography';
|
|
5
|
+
import { createMarkdownComponents } from './markdownComponents';
|
|
6
|
+
const CONTENEURS = new Set(['ul', 'ol', 'li', 'blockquote', 'table', 'thead', 'tbody', 'tr', 'section']);
|
|
7
|
+
const BLOCS = new Set(['p', 'ul', 'ol', 'blockquote', 'pre']);
|
|
8
|
+
// Les listes compactes de Markdown ont du texte directement sous `li`. En natif,
|
|
9
|
+
// chaque suite de texte doit être dans un paragraphe, même avant une sous-liste.
|
|
10
|
+
const paragraphesDeListe = (children) => {
|
|
11
|
+
const resultat = [];
|
|
12
|
+
let inline = [];
|
|
13
|
+
const terminer = () => {
|
|
14
|
+
if (inline.length)
|
|
15
|
+
resultat.push({ type: 'element', tagName: 'p', properties: {}, children: inline });
|
|
16
|
+
inline = [];
|
|
17
|
+
};
|
|
18
|
+
for (const enfant of children) {
|
|
19
|
+
if (BLOCS.has(enfant.tagName ?? '')) {
|
|
20
|
+
terminer();
|
|
21
|
+
resultat.push(enfant);
|
|
22
|
+
}
|
|
23
|
+
else
|
|
24
|
+
inline.push(enfant);
|
|
25
|
+
}
|
|
26
|
+
terminer();
|
|
27
|
+
return resultat;
|
|
28
|
+
};
|
|
29
|
+
const preparer = (noeud) => {
|
|
30
|
+
if (!noeud.children)
|
|
31
|
+
return;
|
|
32
|
+
// Les retours entre blocs HTML sont décoratifs. Une View native ne peut pas
|
|
33
|
+
// recevoir ces chaînes de texte, contrairement à un élément DOM.
|
|
34
|
+
if (noeud.type === 'root' || CONTENEURS.has(noeud.tagName ?? '')) {
|
|
35
|
+
noeud.children = noeud.children.filter(enfant => enfant.type !== 'text' || !!enfant.value?.trim());
|
|
36
|
+
}
|
|
37
|
+
if (noeud.tagName === 'li')
|
|
38
|
+
noeud.children = paragraphesDeListe(noeud.children);
|
|
39
|
+
if (noeud.tagName === 'ol') {
|
|
40
|
+
const debut = Number(noeud.properties?.start ?? 1);
|
|
41
|
+
noeud.children.forEach((enfant, index) => {
|
|
42
|
+
enfant.properties = { ...enfant.properties, 'data-marker': `${debut + index}.` };
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
noeud.children.forEach(preparer);
|
|
46
|
+
};
|
|
47
|
+
export const preparerMarkdownNatif = () => preparer;
|
|
48
|
+
const tableauxNatifs = ({ bodyStyle, boldStyle, borderColor, headerBg }) => ({
|
|
49
|
+
table: ({ children }) => (_jsx(Box, { borderWidth: 1, borderColor: borderColor, children: children })),
|
|
50
|
+
thead: ({ children }) => _jsx(Box, { style: { backgroundColor: headerBg }, children: children }),
|
|
51
|
+
tbody: ({ children }) => _jsx(Box, { children: children }),
|
|
52
|
+
tr: ({ children }) => _jsx(Box, { style: { flexDirection: 'row' }, children: children }),
|
|
53
|
+
th: ({ children }) => (_jsx(Box, { p: 8, borderWidth: 1, borderColor: borderColor, style: { flex: 1, minWidth: 0 }, children: _jsx(Typography, { style: boldStyle, children: children }) })),
|
|
54
|
+
td: ({ children }) => (_jsx(Box, { p: 8, borderWidth: 1, borderColor: borderColor, style: { flex: 1, minWidth: 0 }, children: _jsx(Typography, { style: bodyStyle, children: children }) })),
|
|
55
|
+
});
|
|
56
|
+
export const createNativeMarkdownComponents = (styles) => ({
|
|
57
|
+
...createMarkdownComponents(styles),
|
|
58
|
+
...tableauxNatifs(styles),
|
|
59
|
+
section: ({ children }) => _jsx(Box, { style: { gap: 8 }, children: children }),
|
|
60
|
+
sup: ({ children }) => _jsx(Typography, { style: styles.bodyStyle, children: children }),
|
|
61
|
+
h5: ({ children }) => (_jsx(Typography, { style: styles.titres['H6 - XXS'], color: styles.titleColor, children: children })),
|
|
62
|
+
h6: ({ children }) => (_jsx(Typography, { style: styles.titres['H6 - XXS'], color: styles.titleColor, children: children })),
|
|
63
|
+
a: ({ href, children }) => (_jsx(Typography, { style: styles.bodyStyle, color: styles.linkColor, textDecorationLine: "underline", accessibilityRole: "link", onPress: href ? () => void Linking.openURL(href) : undefined, children: children })),
|
|
64
|
+
li: ({ children, node }) => {
|
|
65
|
+
const marque = node?.properties?.['data-marker'];
|
|
66
|
+
return (_jsxs(Box, { style: { flexDirection: 'row', gap: 8, alignItems: 'flex-start' }, children: [_jsx(Typography, { style: styles.bodyStyle, children: typeof marque === 'string' ? marque : '•' }), _jsx(Box, { style: { flex: 1, gap: 4 }, children: children })] }));
|
|
67
|
+
},
|
|
68
|
+
br: () => _jsx(Typography, { children: '\n' }),
|
|
69
|
+
hr: () => _jsx(Box, { style: { borderTopWidth: 1, borderColor: styles.borderColor } }),
|
|
70
|
+
del: ({ children }) => _jsx(Typography, { style: { textDecorationLine: 'line-through' }, children: children }),
|
|
71
|
+
input: ({ checked }) => _jsx(Typography, { children: checked ? '☑ ' : '☐ ' }),
|
|
72
|
+
img: ({ alt }) => _jsx(Typography, { style: styles.bodyStyle, children: alt }),
|
|
73
|
+
});
|
|
@@ -40,6 +40,11 @@ export declare const WithPageMetaProvider: () => null;
|
|
|
40
40
|
* démontre que le scroll se fait bien au sein de la page.
|
|
41
41
|
*/
|
|
42
42
|
export declare const WithScrollable: () => import("react").JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Active le fond en dégradé vertical (`default-grey` → `alt-grey`) via `gradient`.
|
|
45
|
+
* Désactivé par défaut : le fond est uni.
|
|
46
|
+
*/
|
|
47
|
+
export declare const WithGradient: () => import("react").JSX.Element;
|
|
43
48
|
/**
|
|
44
49
|
* Intégration avec un contrôleur de sidebar via `useSidebar()`.
|
|
45
50
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.stories.tsx"],"names":[],"mappings":";;;;;;;;;AAIA,wBAUkB;AAElB,eAAO,MAAM,OAAO,mCAInB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAIlB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAI1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mCAY5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,YAAa,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,mCAI1B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,YAAa,CAAC;AAEtC,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.stories.tsx"],"names":[],"mappings":";;;;;;;;;AAIA,wBAUkB;AAElB,eAAO,MAAM,OAAO,mCAInB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAIlB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAI1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mCAY5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,YAAa,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,mCAI1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,mCAIxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,YAAa,CAAC;AAEtC,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC"}
|
|
@@ -46,6 +46,11 @@ export const WithPageMetaProvider = () => null;
|
|
|
46
46
|
* démontre que le scroll se fait bien au sein de la page.
|
|
47
47
|
*/
|
|
48
48
|
export const WithScrollable = () => (_jsx(Page, { title: "Page scrollable", scrollable: true, children: _jsx(Typography, { children: "Page avec du scroll." }) }));
|
|
49
|
+
/**
|
|
50
|
+
* Active le fond en dégradé vertical (`default-grey` → `alt-grey`) via `gradient`.
|
|
51
|
+
* Désactivé par défaut : le fond est uni.
|
|
52
|
+
*/
|
|
53
|
+
export const WithGradient = () => (_jsx(Page, { title: "Page avec d\u00E9grad\u00E9", gradient: true, children: _jsx(Typography, { children: "Page avec un fond en d\u00E9grad\u00E9." }) }));
|
|
49
54
|
/**
|
|
50
55
|
* Intégration avec un contrôleur de sidebar via `useSidebar()`.
|
|
51
56
|
*
|
|
@@ -4,6 +4,7 @@ export declare const WithMetaRobots: () => string;
|
|
|
4
4
|
export declare const WithMultipleMeta: () => string;
|
|
5
5
|
export declare const WithPageMetaProvider: () => string;
|
|
6
6
|
export declare const WithScrollable: () => string;
|
|
7
|
+
export declare const WithGradient: () => string;
|
|
7
8
|
export declare const WithSidebar: () => string;
|
|
8
9
|
export declare const storySources: {
|
|
9
10
|
readonly Default: () => string;
|
|
@@ -12,6 +13,7 @@ export declare const storySources: {
|
|
|
12
13
|
readonly WithMultipleMeta: () => string;
|
|
13
14
|
readonly WithPageMetaProvider: () => string;
|
|
14
15
|
readonly WithScrollable: () => string;
|
|
16
|
+
readonly WithGradient: () => string;
|
|
15
17
|
readonly WithSidebar: () => string;
|
|
16
18
|
};
|
|
17
19
|
export type StorySourceName = keyof typeof storySources;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAmK,CAAC;AAExL,eAAO,MAAM,MAAM,cAA2O,CAAC;AAE/P,eAAO,MAAM,cAAc,cAAoP,CAAC;AAEhR,eAAO,MAAM,gBAAgB,cAAsa,CAAC;AAEpc,eAAO,MAAM,oBAAoB,cAA0D,CAAC;AAE5F,eAAO,MAAM,cAAc,cAAiK,CAAC;AAE7L,eAAO,MAAM,WAAW,cAAiD,CAAC;AAE1E,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Page.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAmK,CAAC;AAExL,eAAO,MAAM,MAAM,cAA2O,CAAC;AAE/P,eAAO,MAAM,cAAc,cAAoP,CAAC;AAEhR,eAAO,MAAM,gBAAgB,cAAsa,CAAC;AAEpc,eAAO,MAAM,oBAAoB,cAA0D,CAAC;AAE5F,eAAO,MAAM,cAAc,cAAiK,CAAC;AAE7L,eAAO,MAAM,YAAY,cAAwK,CAAC;AAElM,eAAO,MAAM,WAAW,cAAiD,CAAC;AAE1E,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAKtE,CAAC"}
|
|
@@ -6,6 +6,7 @@ export const WithMetaRobots = () => "export const WithMetaRobots = () => (\n <P
|
|
|
6
6
|
export const WithMultipleMeta = () => "export const WithMultipleMeta = () => (\n <Page\n title=\"Page complète\"\n description=\"Avec plusieurs balises meta\"\n meta={[\n { name: 'robots', content: 'noindex, nofollow' },\n { name: 'author', content: 'Alvéole' },\n { httpEquiv: 'X-UA-Compatible', content: 'IE=edge' },\n ]}\n >\n <Typography>Page avec plusieurs balises meta personnalisées.</Typography>\n </Page>\n);";
|
|
7
7
|
export const WithPageMetaProvider = () => "export const WithPageMetaProvider = () => null;";
|
|
8
8
|
export const WithScrollable = () => "export const WithScrollable = () => (\n <Page title=\"Page scrollable\" scrollable>\n <Typography>Page avec du scroll.</Typography>\n </Page>\n);";
|
|
9
|
+
export const WithGradient = () => "export const WithGradient = () => (\n <Page title=\"Page avec dégradé\" gradient>\n <Typography>Page avec un fond en dégradé.</Typography>\n </Page>\n);";
|
|
9
10
|
export const WithSidebar = () => "export const WithSidebar = () => null;";
|
|
10
11
|
export const storySources = {
|
|
11
12
|
Default,
|
|
@@ -14,10 +15,12 @@ export const storySources = {
|
|
|
14
15
|
WithMultipleMeta,
|
|
15
16
|
WithPageMetaProvider,
|
|
16
17
|
WithScrollable,
|
|
18
|
+
WithGradient,
|
|
17
19
|
WithSidebar,
|
|
18
20
|
};
|
|
19
21
|
export const storyDescriptions = {
|
|
20
22
|
WithPageMetaProvider: "Configure des meta globales pour toutes les pages via `PageMetaProvider` dans `app/_layout.tsx`.\nLes meta du provider sont injectées en premier ; la prop `meta` de chaque `<Page>` les complète ou les écrase.\n\n```tsx\nimport { PageMetaProvider } from '@alveole/components';\n\nexport default function RootLayout() {\n return (\n <PageMetaProvider meta={[{ name: 'robots', content: 'noindex, nofollow' }]}>\n <Stack />\n </PageMetaProvider>\n );\n}\n\n// Une page peut surcharger ou ajouter des meta sans répéter le noindex :\n<Page title=\"Ma page\" meta={[{ name: 'author', content: 'Alvéole' }]} />\n```",
|
|
21
23
|
WithScrollable: "Rend la page scrollable via l'attribut `scrollable`. Accepte aussi `mobile-only` ou `desktop-only`\npour limiter le scroll à une plateforme.\n\nCi-dessous, 4 Box de 300px de haut chacune : le contenu dépasse la hauteur de l'écran, ce qui\ndémontre que le scroll se fait bien au sein de la page.",
|
|
24
|
+
WithGradient: "Active le fond en dégradé vertical (`default-grey` → `alt-grey`) via `gradient`.\nDésactivé par défaut : le fond est uni.",
|
|
22
25
|
WithSidebar: "Intégration avec un contrôleur de sidebar via `useSidebar()`.\n\n```tsx\nconst sidebarController = useSidebar();\nreturn (\n <Page\n sideBarController={sidebarController}\n sidebar={<AdminNavigation sidebarController={sidebarController} />}\n title=\"Mon titre\"\n >\n ...\n </Page>\n);\n```",
|
|
23
26
|
};
|