@alveole/components 0.19.3 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/core/A/A.d.ts +16 -0
  2. package/dist/core/A/A.d.ts.map +1 -0
  3. package/dist/core/A/A.js +16 -0
  4. package/dist/core/A/A.stories.d.ts +20 -0
  5. package/dist/core/A/A.stories.d.ts.map +1 -0
  6. package/dist/core/A/A.stories.js +13 -0
  7. package/dist/core/A/A.styles.d.ts +11 -0
  8. package/dist/core/A/A.styles.d.ts.map +1 -0
  9. package/dist/core/A/A.styles.js +11 -0
  10. package/dist/core/A/index.d.ts +2 -0
  11. package/dist/core/A/index.d.ts.map +1 -0
  12. package/dist/core/A/index.js +1 -0
  13. package/dist/core/index.d.ts +1 -0
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.js +1 -0
  16. package/dist/stories/index.d.ts +4 -0
  17. package/dist/stories/index.d.ts.map +1 -1
  18. package/dist/stories/index.js +4 -0
  19. package/dist/ui/Breadcrumbs/Breadcrumbs.d.ts +28 -0
  20. package/dist/ui/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
  21. package/dist/ui/Breadcrumbs/Breadcrumbs.js +42 -0
  22. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts +45 -0
  23. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
  24. package/dist/ui/Breadcrumbs/Breadcrumbs.stories.js +34 -0
  25. package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts +33 -0
  26. package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
  27. package/dist/ui/Breadcrumbs/Breadcrumbs.styles.js +27 -0
  28. package/dist/ui/Breadcrumbs/index.d.ts +3 -0
  29. package/dist/ui/Breadcrumbs/index.d.ts.map +1 -0
  30. package/dist/ui/Breadcrumbs/index.js +1 -0
  31. package/dist/ui/Button/Button.stories.d.ts +0 -13
  32. package/dist/ui/Button/Button.stories.d.ts.map +1 -1
  33. package/dist/ui/Button/Button.styles.d.ts +0 -13
  34. package/dist/ui/Button/Button.styles.d.ts.map +1 -1
  35. package/dist/ui/Button/Button.styles.js +1 -2
  36. package/dist/ui/Card/Card.d.ts +14 -0
  37. package/dist/ui/Card/Card.d.ts.map +1 -0
  38. package/dist/ui/Card/Card.js +16 -0
  39. package/dist/ui/Card/Card.stories.d.ts +66 -0
  40. package/dist/ui/Card/Card.stories.d.ts.map +1 -0
  41. package/dist/ui/Card/Card.stories.js +37 -0
  42. package/dist/ui/Card/Card.styles.d.ts +15 -0
  43. package/dist/ui/Card/Card.styles.d.ts.map +1 -0
  44. package/dist/ui/Card/Card.styles.js +15 -0
  45. package/dist/ui/Card/CardActions.d.ts +4 -0
  46. package/dist/ui/Card/CardActions.d.ts.map +1 -0
  47. package/dist/ui/Card/CardActions.js +8 -0
  48. package/dist/ui/Card/CardActions.styles.d.ts +11 -0
  49. package/dist/ui/Card/CardActions.styles.d.ts.map +1 -0
  50. package/dist/ui/Card/CardActions.styles.js +11 -0
  51. package/dist/ui/Card/CardHeader.d.ts +12 -0
  52. package/dist/ui/Card/CardHeader.d.ts.map +1 -0
  53. package/dist/ui/Card/CardHeader.js +9 -0
  54. package/dist/ui/Card/CardHeader.styles.d.ts +31 -0
  55. package/dist/ui/Card/CardHeader.styles.d.ts.map +1 -0
  56. package/dist/ui/Card/CardHeader.styles.js +25 -0
  57. package/dist/ui/Card/CardSection.d.ts +12 -0
  58. package/dist/ui/Card/CardSection.d.ts.map +1 -0
  59. package/dist/ui/Card/CardSection.js +14 -0
  60. package/dist/ui/Card/CardSection.styles.d.ts +46 -0
  61. package/dist/ui/Card/CardSection.styles.d.ts.map +1 -0
  62. package/dist/ui/Card/CardSection.styles.js +40 -0
  63. package/dist/ui/Card/index.d.ts +2 -0
  64. package/dist/ui/Card/index.d.ts.map +1 -0
  65. package/dist/ui/Card/index.js +1 -0
  66. package/dist/ui/LucideIcon/LucideIcon.props.d.ts +2 -2
  67. package/dist/ui/LucideIcon/LucideIcon.stories.d.ts +1 -1
  68. package/dist/ui/PageHeader/PageHeader.d.ts +15 -0
  69. package/dist/ui/PageHeader/PageHeader.d.ts.map +1 -0
  70. package/dist/ui/PageHeader/PageHeader.js +12 -0
  71. package/dist/ui/PageHeader/PageHeader.stories.d.ts +39 -0
  72. package/dist/ui/PageHeader/PageHeader.stories.d.ts.map +1 -0
  73. package/dist/ui/PageHeader/PageHeader.stories.js +15 -0
  74. package/dist/ui/PageHeader/PageHeader.styles.d.ts +29 -0
  75. package/dist/ui/PageHeader/PageHeader.styles.d.ts.map +1 -0
  76. package/dist/ui/PageHeader/PageHeader.styles.js +26 -0
  77. package/dist/ui/PageHeader/index.d.ts +3 -0
  78. package/dist/ui/PageHeader/index.d.ts.map +1 -0
  79. package/dist/ui/PageHeader/index.js +1 -0
  80. package/dist/ui/index.d.ts +3 -0
  81. package/dist/ui/index.d.ts.map +1 -1
  82. package/dist/ui/index.js +3 -0
  83. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import { Href } from 'expo-router';
2
+ import React, { CSSProperties } from 'react';
3
+ export type CanAccessHref = (href: Href & string) => boolean;
4
+ /** Contexte optionnel pour fournir la logique d'accès aux liens (ex. droits métier). Non fourni = tous les liens sont cliquables. */
5
+ export declare const LinkAccessContext: React.Context<CanAccessHref | null>;
6
+ export type AProps = React.PropsWithChildren<{
7
+ href: Href & string;
8
+ /** default: "push" */
9
+ direction?: 'push' | 'replace' | 'dismiss';
10
+ style?: CSSProperties;
11
+ hoverStyle?: CSSProperties;
12
+ /** Override la logique d'accès (sinon utilise LinkAccessContext si fourni, sinon accès autorisé). */
13
+ canAccessHref?: CanAccessHref;
14
+ }>;
15
+ export declare const A: (props: AProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=A.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A.d.ts","sourceRoot":"","sources":["../../../src/core/A/A.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAQ,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,EAAE,aAAa,EAA6B,MAAM,OAAO,CAAC;AAKxE,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC;AAE7D,qIAAqI;AACrI,eAAO,MAAM,iBAAiB,qCAA4C,CAAC;AAE3E,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,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,qGAAqG;IACrG,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC,CAAC;AAEH,eAAO,MAAM,CAAC,GAAI,OAAO,MAAM,4CAwB9B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Link } from 'expo-router';
3
+ import { createContext, useContext } from 'react';
4
+ import { Pressable } from 'react-native';
5
+ import { Box } from '../Box';
6
+ import { useStyles } from './A.styles';
7
+ /** Contexte optionnel pour fournir la logique d'accès aux liens (ex. droits métier). Non fourni = tous les liens sont cliquables. */
8
+ export const LinkAccessContext = createContext(null);
9
+ export const A = (props) => {
10
+ const { children, href, direction = 'push', style, hoverStyle, canAccessHref: canAccessProp } = props;
11
+ const styles = useStyles();
12
+ const canAccessFromContext = useContext(LinkAccessContext);
13
+ const canAccess = canAccessProp ?? canAccessFromContext ?? (() => true);
14
+ const expoLink = (_jsx(Link, { href: href, asChild: true, replace: direction === 'replace', push: direction === 'push', dismissTo: direction === 'dismiss', children: _jsx(Pressable, { children: _jsx(Box, { tag: "a-pressable", style: { ...styles.pressable, ...style }, hoverStyle: hoverStyle, children: children }) }) }));
15
+ return canAccess(href) ? expoLink : _jsx(_Fragment, { children: children });
16
+ };
@@ -0,0 +1,20 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: true;
5
+ description: string;
6
+ component: (props: import("./A").AProps) => import("react/jsx-runtime").JSX.Element;
7
+ styleFn: () => {
8
+ container: {};
9
+ pressable: {
10
+ cursor: "pointer";
11
+ color: "inherit";
12
+ transitionProperty: "all";
13
+ transitionDuration: "0.1s";
14
+ transitionTimingFunction: "ease-in-out";
15
+ };
16
+ };
17
+ };
18
+ export default _default;
19
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=A.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A.stories.d.ts","sourceRoot":"","sources":["../../../src/core/A/A.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA,wBAOkB;AAElB,eAAO,MAAM,OAAO,+CAInB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Typography } from '../Typography';
3
+ import { A } from './A';
4
+ import { useStyles } from './A.styles';
5
+ export default {
6
+ title: 'A',
7
+ tags: ['Kit'],
8
+ experimental: true,
9
+ description: 'Equivalent d’une balise <a>',
10
+ component: A,
11
+ styleFn: useStyles,
12
+ };
13
+ export const Default = () => (_jsx(A, { href: '/ui-kit/components/A', children: _jsx(Typography, { children: "Children" }) }));
@@ -0,0 +1,11 @@
1
+ export declare const useStyles: () => {
2
+ container: {};
3
+ pressable: {
4
+ cursor: "pointer";
5
+ color: "inherit";
6
+ transitionProperty: "all";
7
+ transitionDuration: "0.1s";
8
+ transitionTimingFunction: "ease-in-out";
9
+ };
10
+ };
11
+ //# sourceMappingURL=A.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A.styles.d.ts","sourceRoot":"","sources":["../../../src/core/A/A.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;CASnB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(() => ({
3
+ container: {},
4
+ pressable: {
5
+ cursor: 'pointer',
6
+ color: 'inherit',
7
+ transitionProperty: 'all',
8
+ transitionDuration: '0.1s',
9
+ transitionTimingFunction: 'ease-in-out',
10
+ },
11
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './A';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/A/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './A';
@@ -1,3 +1,4 @@
1
+ export * from './A';
1
2
  export * from './Box';
2
3
  export * from './Image';
3
4
  export * from './Metabase';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC;AACpB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './A';
1
2
  export * from './Box';
2
3
  export * from './Image';
3
4
  export * from './Metabase';
@@ -1,3 +1,4 @@
1
+ export * as AStory from '../core/A/A.stories';
1
2
  export * as BoxStory from '../core/Box/Box.stories';
2
3
  export * as ImageStory from '../core/Image/Image.stories';
3
4
  export * as MetabaseStory from '../core/Metabase/Metabase.stories';
@@ -6,11 +7,14 @@ export * as SectionStory from '../core/Section/Section.stories';
6
7
  export * as TypographyStory from '../core/Typography/Typography.stories';
7
8
  export * as VersionStory from '../core/Version/Version.stories';
8
9
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
10
+ export * as BreadcrumbsStory from '../ui/Breadcrumbs/Breadcrumbs.stories';
9
11
  export * as ButtonStory from '../ui/Button/Button.stories';
12
+ export * as CardStory from '../ui/Card/Card.stories';
10
13
  export * as DividerStory from '../ui/Divider/Divider.stories';
11
14
  export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
12
15
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
13
16
  export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
17
+ export * as PageHeaderStory from '../ui/PageHeader/PageHeader.stories';
14
18
  export * as ResourceListStory from '../ui/ResourceList/ResourceList.stories';
15
19
  export * as ToolbarBottomNavStory from '../ui/ToolbarBottomNav/ToolbarBottomNav.stories';
16
20
  export * as ToolbarTopStory from '../ui/ToolbarTop/ToolbarTop.stories';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  // Core
2
+ export * as AStory from '../core/A/A.stories';
2
3
  export * as BoxStory from '../core/Box/Box.stories';
3
4
  export * as ImageStory from '../core/Image/Image.stories';
4
5
  export * as MetabaseStory from '../core/Metabase/Metabase.stories';
@@ -8,11 +9,14 @@ export * as TypographyStory from '../core/Typography/Typography.stories';
8
9
  export * as VersionStory from '../core/Version/Version.stories';
9
10
  // UI
10
11
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
12
+ export * as BreadcrumbsStory from '../ui/Breadcrumbs/Breadcrumbs.stories';
11
13
  export * as ButtonStory from '../ui/Button/Button.stories';
14
+ export * as CardStory from '../ui/Card/Card.stories';
12
15
  export * as DividerStory from '../ui/Divider/Divider.stories';
13
16
  export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
14
17
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
15
18
  export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
19
+ export * as PageHeaderStory from '../ui/PageHeader/PageHeader.stories';
16
20
  export * as ResourceListStory from '../ui/ResourceList/ResourceList.stories';
17
21
  export * as ToolbarBottomNavStory from '../ui/ToolbarBottomNav/ToolbarBottomNav.stories';
18
22
  export * as ToolbarTopStory from '../ui/ToolbarTop/ToolbarTop.stories';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export type BreadcrumbItem = {
3
+ label: string;
4
+ href: string;
5
+ isCurrent: boolean;
6
+ };
7
+ export type BreadcrumbsProps = React.PropsWithChildren<{
8
+ /** Label du premier élément (lien vers la racine). Défaut : "Accueil" */
9
+ rootLabel?: string;
10
+ /**
11
+ * Segments à ne pas afficher dans le fil d'Ariane (ex. ["admin"] pour avoir Accueil > Missions au lieu de Accueil > Admin > Missions).
12
+ */
13
+ segmentsToSkip?: string[];
14
+ /**
15
+ * Personnalisation du libellé pour un segment.
16
+ * Par défaut : capitalisation + remplacement des - et _ par des espaces.
17
+ */
18
+ getLabel?: (segment: string, index: number, path: string) => string;
19
+ }>;
20
+ /**
21
+ * Fil d'Ariane construit à partir de la navigation Expo Router.
22
+ * Tous les éléments sauf le dernier (page en cours) sont cliquables.
23
+ *
24
+ * @example
25
+ * Accueil > Admin > Missions > Détail
26
+ */
27
+ export declare const Breadcrumbs: (props: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=Breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAQF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrE,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAoDlD,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { usePathname } from 'expo-router';
3
+ import { A, Box, Typography } from '../../core';
4
+ import { useStyles } from './Breadcrumbs.styles';
5
+ function humanizeSegment(segment) {
6
+ return segment
7
+ .replace(/[-_]/g, ' ')
8
+ .replace(/^\w/, (c) => c.toUpperCase());
9
+ }
10
+ /**
11
+ * Fil d'Ariane construit à partir de la navigation Expo Router.
12
+ * Tous les éléments sauf le dernier (page en cours) sont cliquables.
13
+ *
14
+ * @example
15
+ * Accueil > Admin > Missions > Détail
16
+ */
17
+ export const Breadcrumbs = (props) => {
18
+ const { rootLabel = 'Accueil', segmentsToSkip, getLabel = (segment) => humanizeSegment(segment), } = props;
19
+ const pathname = usePathname();
20
+ const styles = useStyles();
21
+ const segments = pathname.split('/').filter(Boolean);
22
+ const segmentItems = segments
23
+ .map((segment, index) => ({
24
+ segment,
25
+ index,
26
+ path: '/' + segments.slice(0, index + 1).join('/'),
27
+ }))
28
+ .filter(({ segment }) => !segmentsToSkip?.includes(segment));
29
+ const items = [
30
+ {
31
+ label: rootLabel,
32
+ href: '/',
33
+ isCurrent: segments.length === 0,
34
+ },
35
+ ...segmentItems.map(({ segment, index, path }) => ({
36
+ label: getLabel(segment, index, path),
37
+ href: path,
38
+ isCurrent: index === segments.length - 1,
39
+ })),
40
+ ];
41
+ return (_jsx(Box, { style: styles.container, children: items.map((item, index) => (_jsxs(Box, { style: { flexDirection: 'row', alignItems: 'center' }, children: [index > 0 && (_jsx(Typography, { style: styles.separator, children: " > " })), item.isCurrent ? (_jsx(Typography, { style: styles.current, children: item.label })) : (_jsx(A, { href: item.href, style: styles.link, hoverStyle: styles.linkHover, children: item.label }))] }, `${item.href}-${index}`))) }));
42
+ };
@@ -0,0 +1,45 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ description: string;
6
+ component: (props: import("./Breadcrumbs").BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
7
+ styleFn: () => {
8
+ container: {
9
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
10
+ fontSize: 12;
11
+ lineHeight: 20;
12
+ letterSpacing: 0;
13
+ flexDirection: "row";
14
+ flexWrap: "wrap";
15
+ alignItems: "center";
16
+ gap: import("@alveole/theme").Spacing;
17
+ };
18
+ separator: {
19
+ color: "#5F6571";
20
+ };
21
+ current: {
22
+ color: "#151617";
23
+ };
24
+ link: {
25
+ transitionProperty: "text-decoration";
26
+ transitionDuration: "0.1s";
27
+ transitionTimingFunction: "ease-in-out";
28
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
29
+ fontSize: 12;
30
+ lineHeight: 20;
31
+ letterSpacing: 0;
32
+ color: "#5F6571";
33
+ textDecoration: string;
34
+ };
35
+ linkHover: {
36
+ textDecoration: string;
37
+ };
38
+ };
39
+ };
40
+ export default _default;
41
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
42
+ export declare const WithCustomRootLabel: () => import("react/jsx-runtime").JSX.Element;
43
+ export declare const WithCustomLabels: () => import("react/jsx-runtime").JSX.Element;
44
+ export declare const WithSegmentsToSkip: () => import("react/jsx-runtime").JSX.Element;
45
+ //# sourceMappingURL=Breadcrumbs.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumbs.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/Breadcrumbs.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,OAAO,+CAInB,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAI/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAe5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAgB9B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../../core';
3
+ import { Breadcrumbs } from './Breadcrumbs';
4
+ import { useStyles } from './Breadcrumbs.styles';
5
+ export default {
6
+ title: 'Breadcrumbs',
7
+ tags: ['Kit'],
8
+ experimental: false,
9
+ description: "Fil d'Ariane construit à partir de la navigation Expo Router. Tous les éléments sauf le dernier (page en cours) sont cliquables.",
10
+ component: Breadcrumbs,
11
+ styleFn: useStyles,
12
+ };
13
+ export const Default = () => (_jsx(Box, { p: 4, children: _jsx(Breadcrumbs, {}) }));
14
+ export const WithCustomRootLabel = () => (_jsx(Box, { p: 4, children: _jsx(Breadcrumbs, { rootLabel: "Tableau de bord" }) }));
15
+ export const WithCustomLabels = () => (_jsx(Box, { p: 4, children: _jsx(Breadcrumbs, { getLabel: (segment, _index, _path) => {
16
+ const labels = {
17
+ admin: 'Administration',
18
+ missions: 'Missions',
19
+ show: 'Détail',
20
+ salarie: 'Espace salarié',
21
+ client: 'Espace client',
22
+ };
23
+ return labels[segment] ?? segment;
24
+ } }) }));
25
+ export const WithSegmentsToSkip = () => (_jsx(Box, { p: 4, children: _jsx(Breadcrumbs, { segmentsToSkip: ['admin', 'ui-kit'], getLabel: (segment, _index, _path) => {
26
+ const labels = {
27
+ admin: 'Administration',
28
+ missions: 'Missions',
29
+ show: 'Détail',
30
+ salarie: 'Espace salarié',
31
+ client: 'Espace client',
32
+ };
33
+ return labels[segment] ?? segment;
34
+ } }) }));
@@ -0,0 +1,33 @@
1
+ export declare const useStyles: () => {
2
+ container: {
3
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
4
+ fontSize: 12;
5
+ lineHeight: 20;
6
+ letterSpacing: 0;
7
+ flexDirection: "row";
8
+ flexWrap: "wrap";
9
+ alignItems: "center";
10
+ gap: import("@alveole/theme").Spacing;
11
+ };
12
+ separator: {
13
+ color: "#5F6571";
14
+ };
15
+ current: {
16
+ color: "#151617";
17
+ };
18
+ link: {
19
+ transitionProperty: "text-decoration";
20
+ transitionDuration: "0.1s";
21
+ transitionTimingFunction: "ease-in-out";
22
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
23
+ fontSize: 12;
24
+ lineHeight: 20;
25
+ letterSpacing: 0;
26
+ color: "#5F6571";
27
+ textDecoration: string;
28
+ };
29
+ linkHover: {
30
+ textDecoration: string;
31
+ };
32
+ };
33
+ //# sourceMappingURL=Breadcrumbs.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumbs.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/Breadcrumbs.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBnB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(({ text, color, spacing }) => ({
3
+ container: {
4
+ flexDirection: 'row',
5
+ flexWrap: 'wrap',
6
+ alignItems: 'center',
7
+ gap: spacing('1V'),
8
+ ...text['Corps de texte'].XS.Regular,
9
+ },
10
+ separator: {
11
+ color: color.light.text['mention-grey'],
12
+ },
13
+ current: {
14
+ color: color.light.text['active-grey'],
15
+ },
16
+ link: {
17
+ color: color.light.text['mention-grey'],
18
+ textDecoration: 'underline',
19
+ ...text['Corps de texte'].XS.Regular,
20
+ transitionProperty: 'text-decoration',
21
+ transitionDuration: '0.1s',
22
+ transitionTimingFunction: 'ease-in-out',
23
+ },
24
+ linkHover: {
25
+ textDecoration: 'none',
26
+ },
27
+ }));
@@ -0,0 +1,3 @@
1
+ export { Breadcrumbs } from './Breadcrumbs';
2
+ export type { BreadcrumbItem, BreadcrumbsProps } from './Breadcrumbs';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ export { Breadcrumbs } from './Breadcrumbs';
@@ -46,19 +46,6 @@ declare const _default: {
46
46
  };
47
47
  primaryContainer: {
48
48
  backgroundColor: "#002764";
49
- } | {
50
- shadowColor: import("@alveole/theme").Color;
51
- shadowOffset: {
52
- width: number;
53
- height: number;
54
- };
55
- shadowOpacity: number;
56
- shadowRadius: number;
57
- elevation: number;
58
- backgroundColor: "#002764";
59
- } | {
60
- boxShadow: string;
61
- backgroundColor: "#002764";
62
49
  };
63
50
  primaryTitleHover: {
64
51
  color: "#F2F9FF";
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,KAAK,+CAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAKpB,CAAC;AAEF,eAAO,MAAM,IAAI,+CAKhB,CAAC;AAEF,eAAO,MAAM,KAAK,+CAQjB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAIrB,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,KAAK,+CAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAKpB,CAAC;AAEF,eAAO,MAAM,IAAI,+CAKhB,CAAC;AAEF,eAAO,MAAM,KAAK,+CAQjB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAIrB,CAAC"}
@@ -26,19 +26,6 @@ export declare const useStyles: () => {
26
26
  };
27
27
  primaryContainer: {
28
28
  backgroundColor: "#002764";
29
- } | {
30
- shadowColor: import("@alveole/theme").Color;
31
- shadowOffset: {
32
- width: number;
33
- height: number;
34
- };
35
- shadowOpacity: number;
36
- shadowRadius: number;
37
- elevation: number;
38
- backgroundColor: "#002764";
39
- } | {
40
- boxShadow: string;
41
- backgroundColor: "#002764";
42
29
  };
43
30
  primaryTitleHover: {
44
31
  color: "#F2F9FF";
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4MnB,CAAC"}
1
+ {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2MnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { makeStyles } from '@alveole/theme';
2
- export const useStyles = makeStyles(({ text, color, spacing, shadows, radius }) => ({
2
+ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
3
3
  container: {
4
4
  borderTopLeftRadius: radius('md'),
5
5
  borderBottomLeftRadius: radius('md'),
@@ -28,7 +28,6 @@ export const useStyles = makeStyles(({ text, color, spacing, shadows, radius })
28
28
  },
29
29
  primaryContainer: {
30
30
  backgroundColor: color.light.background['action-high-primary'],
31
- ...shadows(2),
32
31
  },
33
32
  primaryTitleHover: {
34
33
  color: color.light.text['inverted-primary'],
@@ -0,0 +1,14 @@
1
+ import { BoxProps } from '../../core';
2
+ import { CardActions } from './CardActions';
3
+ import { CardHeader } from './CardHeader';
4
+ import { CardSection } from './CardSection';
5
+ export type CardProps = BoxProps;
6
+ declare const CardBase: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
7
+ type CardCompoundComponent = typeof CardBase & {
8
+ Header: typeof CardHeader;
9
+ Section: typeof CardSection;
10
+ Actions: typeof CardActions;
11
+ };
12
+ export declare const Card: CardCompoundComponent;
13
+ export {};
14
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;AAEjC,QAAA,MAAM,QAAQ,GAAI,OAAO,SAAS,4CAUjC,CAAC;AAEF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,OAAO,EAAE,OAAO,WAAW,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,qBAIjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../../core';
3
+ import { useStyles } from './Card.styles';
4
+ import { CardActions } from './CardActions';
5
+ import { CardHeader } from './CardHeader';
6
+ import { CardSection } from './CardSection';
7
+ const CardBase = (props) => {
8
+ const { style, children, ...boxProps } = props;
9
+ const styles = useStyles();
10
+ return (_jsx(Box, { tag: "card", style: [styles.card, style], ...boxProps, children: children }));
11
+ };
12
+ export const Card = Object.assign(CardBase, {
13
+ Header: CardHeader,
14
+ Section: CardSection,
15
+ Actions: CardActions,
16
+ });
@@ -0,0 +1,66 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ figmaURL: string;
6
+ description: string;
7
+ component: ((props: import("./Card").CardProps) => import("react/jsx-runtime").JSX.Element) & {
8
+ Header: typeof import("./CardHeader").CardHeader;
9
+ Section: typeof import("./CardSection").CardSection;
10
+ Actions: typeof import("./CardActions").CardActions;
11
+ };
12
+ styleFn: () => {
13
+ cardSection: {
14
+ display: "flex";
15
+ flexDirection: "column";
16
+ gap: import("@alveole/theme").Spacing;
17
+ width: "100%";
18
+ };
19
+ title: {
20
+ display: "flex";
21
+ flexDirection: "row";
22
+ alignItems: "center";
23
+ gap: import("@alveole/theme").Spacing;
24
+ };
25
+ titleIcon: {
26
+ display: "flex";
27
+ alignItems: "center";
28
+ };
29
+ titleText: {
30
+ color: "#151617";
31
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
32
+ fontSize: 14;
33
+ lineHeight: 20;
34
+ letterSpacing: 0;
35
+ };
36
+ description: {
37
+ display: "flex";
38
+ flexDirection: "row";
39
+ alignItems: "center";
40
+ gap: import("@alveole/theme").Spacing;
41
+ };
42
+ descriptionIcon: {
43
+ display: "flex";
44
+ alignItems: "center";
45
+ };
46
+ descriptionText: {
47
+ color: "#373A3F";
48
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
49
+ fontSize: 14;
50
+ lineHeight: 20;
51
+ letterSpacing: 0;
52
+ };
53
+ disabledText: {
54
+ color: "#8D97AC";
55
+ };
56
+ };
57
+ };
58
+ export default _default;
59
+ export declare const card: () => import("react/jsx-runtime").JSX.Element;
60
+ export declare const cardDisabled: () => import("react/jsx-runtime").JSX.Element;
61
+ export declare const cardSection: () => import("react/jsx-runtime").JSX.Element;
62
+ export declare const cardSectionDisabled: () => import("react/jsx-runtime").JSX.Element;
63
+ export declare const cardHeader: () => import("react/jsx-runtime").JSX.Element;
64
+ export declare const cardHeaderDisabled: () => import("react/jsx-runtime").JSX.Element;
65
+ export declare const cardActions: () => import("react/jsx-runtime").JSX.Element;
66
+ //# sourceMappingURL=Card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAQkB;AAElB,eAAO,MAAM,IAAI,+CAgBhB,CAAC;AAEF,eAAO,MAAM,YAAY,+CA2BxB,CAAC;AAEF,eAAO,MAAM,WAAW,+CASvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAU/B,CAAC;AAEF,eAAO,MAAM,UAAU,+CAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAS9B,CAAC;AAEF,eAAO,MAAM,WAAW,+CAYvB,CAAC"}