@alveole/components 2.0.0-alpha.12 → 2.0.0-alpha.14

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 (100) hide show
  1. package/dist/core/Code/Code.d.ts.map +1 -1
  2. package/dist/core/Code/Code.js +6 -0
  3. package/dist/core/Code/Code.stories.d.ts +15 -2
  4. package/dist/core/Code/Code.stories.d.ts.map +1 -1
  5. package/dist/core/Code/Code.styles.d.ts +15 -2
  6. package/dist/core/Code/Code.styles.d.ts.map +1 -1
  7. package/dist/core/Code/Code.styles.js +18 -4
  8. package/dist/core/Highlight/Highlight.d.ts.map +1 -1
  9. package/dist/core/Highlight/Highlight.js +4 -4
  10. package/dist/core/Highlight/Highlight.stories.d.ts +16 -2
  11. package/dist/core/Highlight/Highlight.stories.d.ts.map +1 -1
  12. package/dist/core/Highlight/Highlight.stories.js +1 -1
  13. package/dist/core/Highlight/Highlight.stories.sources.d.ts.map +1 -1
  14. package/dist/core/Highlight/Highlight.stories.sources.js +1 -1
  15. package/dist/core/Highlight/Highlight.styles.d.ts +16 -2
  16. package/dist/core/Highlight/Highlight.styles.d.ts.map +1 -1
  17. package/dist/core/Highlight/Highlight.styles.js +13 -1
  18. package/dist/core/MarkdownDescription/MarkdownDescription.js +1 -1
  19. package/dist/core/Metabase/Metabase.stories.d.ts.map +1 -1
  20. package/dist/core/Metabase/Metabase.stories.js +3 -2
  21. package/dist/core/Metabase/Metabase.stories.sources.d.ts.map +1 -1
  22. package/dist/core/Metabase/Metabase.stories.sources.js +1 -1
  23. package/dist/generated/version.d.ts +1 -1
  24. package/dist/generated/version.js +1 -1
  25. package/dist/ui/ActionMenu/ActionMenuItem.d.ts.map +1 -1
  26. package/dist/ui/ActionMenu/ActionMenuItem.js +5 -2
  27. package/dist/ui/BottomSheet/BottomSheet.js +1 -1
  28. package/dist/ui/BottomSheet/BottomSheet.stories.d.ts +4 -3
  29. package/dist/ui/BottomSheet/BottomSheet.stories.d.ts.map +1 -1
  30. package/dist/ui/BottomSheet/BottomSheet.styles.d.ts +4 -3
  31. package/dist/ui/BottomSheet/BottomSheet.styles.d.ts.map +1 -1
  32. package/dist/ui/BottomSheet/BottomSheet.styles.js +4 -3
  33. package/dist/ui/Button/Button.stories.js +8 -8
  34. package/dist/ui/Button/Button.stories.sources.d.ts.map +1 -1
  35. package/dist/ui/Button/Button.stories.sources.js +8 -8
  36. package/dist/ui/Checkbox/Checkbox.stories.d.ts +2 -1
  37. package/dist/ui/Checkbox/Checkbox.stories.d.ts.map +1 -1
  38. package/dist/ui/Checkbox/Checkbox.stories.js +3 -2
  39. package/dist/ui/Checkbox/Checkbox.stories.sources.d.ts.map +1 -1
  40. package/dist/ui/Checkbox/Checkbox.stories.sources.js +2 -2
  41. package/dist/ui/Checkbox/Checkbox.styles.d.ts +2 -1
  42. package/dist/ui/Checkbox/Checkbox.styles.d.ts.map +1 -1
  43. package/dist/ui/Checkbox/Checkbox.styles.js +3 -1
  44. package/dist/ui/Checkbox/CheckboxLabel.d.ts.map +1 -1
  45. package/dist/ui/Checkbox/CheckboxLabel.js +2 -1
  46. package/dist/ui/DocumentViewer/DocumentViewer.stories.js +4 -4
  47. package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.d.ts.map +1 -1
  48. package/dist/ui/DocumentViewer/DocumentViewer.stories.sources.js +4 -4
  49. package/dist/ui/FilterDate/FilterDate.js +1 -1
  50. package/dist/ui/FormControl/OtpInput.stories.js +1 -1
  51. package/dist/ui/FormControl/OtpInput.stories.sources.d.ts.map +1 -1
  52. package/dist/ui/FormControl/OtpInput.stories.sources.js +1 -1
  53. package/dist/ui/FormControl/TextInputPassword.d.ts.map +1 -1
  54. package/dist/ui/FormControl/TextInputPassword.js +9 -2
  55. package/dist/ui/FormControl/textInputStyles.d.ts +1 -0
  56. package/dist/ui/FormControl/textInputStyles.d.ts.map +1 -1
  57. package/dist/ui/FormControl/textInputStyles.js +1 -0
  58. package/dist/ui/FormControl/useChoixDeFichier.d.ts.map +1 -1
  59. package/dist/ui/FormControl/useChoixDeFichier.js +15 -3
  60. package/dist/ui/RadioGroup/RadioGroup.js +1 -1
  61. package/dist/ui/RadioGroup/RadioGroupContext.d.ts +1 -0
  62. package/dist/ui/RadioGroup/RadioGroupContext.d.ts.map +1 -1
  63. package/dist/ui/RadioGroup/RadioGroupItem.d.ts.map +1 -1
  64. package/dist/ui/RadioGroup/RadioGroupItem.js +7 -2
  65. package/dist/ui/Select/Select.stories.d.ts +0 -1
  66. package/dist/ui/Select/Select.stories.d.ts.map +1 -1
  67. package/dist/ui/Select/Select.styles.d.ts +1 -2
  68. package/dist/ui/Select/Select.styles.d.ts.map +1 -1
  69. package/dist/ui/Select/Select.styles.js +1 -2
  70. package/dist/ui/Select/selectTriggerStyle.d.ts +1 -1
  71. package/dist/ui/Switch/Switch.d.ts.map +1 -1
  72. package/dist/ui/Switch/Switch.js +4 -2
  73. package/dist/ui/Tag/Tag.d.ts.map +1 -1
  74. package/dist/ui/Tag/Tag.js +14 -2
  75. package/dist/ui/Tag/Tag.stories.d.ts +8 -0
  76. package/dist/ui/Tag/Tag.stories.d.ts.map +1 -1
  77. package/dist/ui/Tag/Tag.styles.d.ts +8 -0
  78. package/dist/ui/Tag/Tag.styles.d.ts.map +1 -1
  79. package/dist/ui/Tag/Tag.styles.js +11 -0
  80. package/dist/ui/Tag/TagNativeContent.d.ts +11 -0
  81. package/dist/ui/Tag/TagNativeContent.d.ts.map +1 -0
  82. package/dist/ui/Tag/TagNativeContent.js +10 -0
  83. package/dist/ui/TextInputArray/TextInputArray.js +1 -1
  84. package/dist/ui/Toast/Toast.stories.d.ts +11 -4
  85. package/dist/ui/Toast/Toast.stories.d.ts.map +1 -1
  86. package/dist/ui/Toast/Toast.styles.d.ts +11 -4
  87. package/dist/ui/Toast/Toast.styles.d.ts.map +1 -1
  88. package/dist/ui/Toast/Toast.styles.js +6 -3
  89. package/dist/ui/ToolbarTop/ToolbarTop.d.ts.map +1 -1
  90. package/dist/ui/ToolbarTop/ToolbarTop.js +1 -2
  91. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts +1 -2
  92. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts.map +1 -1
  93. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts +1 -2
  94. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts.map +1 -1
  95. package/dist/ui/ToolbarTop/ToolbarTop.styles.js +1 -2
  96. package/dist/ui/ToolbarTop/ToolbarTop.types.d.ts +2 -3
  97. package/dist/ui/ToolbarTop/ToolbarTop.types.d.ts.map +1 -1
  98. package/dist/ui/ToolbarTop/toolbarTopStyling.d.ts +3 -2
  99. package/dist/ui/ToolbarTop/toolbarTopStyling.d.ts.map +1 -1
  100. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,cAAc,SAAS,gCAQ3C,CAAC"}
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,cAAc,SAAS,gCAkB3C,CAAC"}
@@ -1,9 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useTheme } from '@alveole/theme';
3
+ import { Platform, View } from 'react-native';
3
4
  import { Typography } from '../Typography';
4
5
  import { useStyles } from './Code.styles';
5
6
  export const Code = ({ children }) => {
6
7
  const { text } = useTheme();
7
8
  const styles = useStyles();
9
+ // Un Text imbriqué ignore le padding et l'arrondi en natif. Une vue inline
10
+ // porte la surface et laisse le texte du code dans le flux du paragraphe.
11
+ if (Platform.OS !== 'web') {
12
+ return (_jsx(View, { style: styles.codeSurface, children: _jsx(Typography, { style: [text['Corps de texte'].SM.Regular, styles.codeText], children: children }) }));
13
+ }
8
14
  return (_jsx(Typography, { tag: "code", style: [text['Corps de texte'].SM.Regular, styles.code], children: children }));
9
15
  };
@@ -6,15 +6,28 @@ declare const _default: {
6
6
  component: ({ children }: import("./Code").CodeProps) => import("react").JSX.Element;
7
7
  styleFn: () => {
8
8
  code: {
9
- color: string;
10
- backgroundColor: "rgba(135, 131, 120, 0.12)";
9
+ backgroundColor: string;
11
10
  paddingLeft: number;
12
11
  paddingRight: number;
13
12
  paddingTop: number;
14
13
  paddingBottom: number;
15
14
  borderRadius: import("@alveole/theme").Radius;
15
+ color: string;
16
+ fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
17
+ };
18
+ codeText: {
19
+ color: string;
16
20
  fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
17
21
  };
22
+ codeSurface: {
23
+ paddingTop: number;
24
+ paddingBottom: number;
25
+ transform: "translateY(2px)";
26
+ backgroundColor: string;
27
+ paddingLeft: number;
28
+ paddingRight: number;
29
+ borderRadius: import("@alveole/theme").Radius;
30
+ };
18
31
  };
19
32
  };
20
33
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Code.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,wBAOkB;AAElB,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAWlB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"Code.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAOkB;AAElB,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAWlB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC"}
@@ -1,13 +1,26 @@
1
1
  export declare const useStyles: () => {
2
2
  code: {
3
- color: string;
4
- backgroundColor: "rgba(135, 131, 120, 0.12)";
3
+ backgroundColor: string;
5
4
  paddingLeft: number;
6
5
  paddingRight: number;
7
6
  paddingTop: number;
8
7
  paddingBottom: number;
9
8
  borderRadius: import("@alveole/theme").Radius;
9
+ color: string;
10
+ fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
11
+ };
12
+ codeText: {
13
+ color: string;
10
14
  fontFamily: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace";
11
15
  };
16
+ codeSurface: {
17
+ paddingTop: number;
18
+ paddingBottom: number;
19
+ transform: "translateY(2px)";
20
+ backgroundColor: string;
21
+ paddingLeft: number;
22
+ paddingRight: number;
23
+ borderRadius: import("@alveole/theme").Radius;
24
+ };
12
25
  };
13
26
  //# sourceMappingURL=Code.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Code.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;CAWnB,CAAC"}
1
+ {"version":3,"file":"Code.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Code/Code.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;CA0BpB,CAAC"}
@@ -1,13 +1,27 @@
1
1
  import { makeStyles, MonospaceFont } from '@alveole/theme';
2
- export const useStyles = makeStyles(({ color, radius }) => ({
3
- code: {
2
+ export const useStyles = makeStyles(({ color, radius }) => {
3
+ const texte = {
4
4
  ...MonospaceFont,
5
5
  color: color.light.text['default-error'],
6
+ };
7
+ const surface = {
6
8
  backgroundColor: 'rgba(135, 131, 120, 0.12)',
7
9
  paddingLeft: 4,
8
10
  paddingRight: 4,
9
11
  paddingTop: 2,
10
12
  paddingBottom: 2,
11
13
  borderRadius: radius('sm'),
12
- },
13
- }));
14
+ };
15
+ return {
16
+ code: { ...texte, ...surface },
17
+ codeText: texte,
18
+ codeSurface: {
19
+ ...surface,
20
+ // La ligne SM fait déjà 20 px : ajouter du padding vertical fait dépasser
21
+ // la vue inline du paragraphe. Le décalage la recentre sur la ligne native.
22
+ paddingTop: 0,
23
+ paddingBottom: 0,
24
+ transform: 'translateY(2px)',
25
+ },
26
+ };
27
+ });
@@ -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,sBA2E9F,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,sBAmE9F,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
3
+ import { 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';
@@ -35,12 +35,12 @@ export const Highlight = ({ children, language, style, variant = 'standalone' })
35
35
  const renderer = ({ rows }) => (_jsx(ScrollView, { horizontal: true, focusable: true,
36
36
  // En natif, ScrollView grandit par défaut. Dans la page défilante du catalogue,
37
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(),
38
+ style: [styles.highlightContainer, variant === 'standalone' && styles.highlightContainerStandalone], ...focusRingProps(),
39
39
  // `styles.highlight` pose `overflow: scroll`, ce qui ferait défiler le conteneur de
40
40
  // contenu en doublon du `ScrollView` qui l'entoure. C'est ce doublon intérieur qu'axe
41
41
  // signalait : il défile sans pouvoir recevoir le focus, que porte l'extérieur.
42
42
  // Le thème de coloration ne fournit que les couleurs de jetons : la surface vient du
43
43
  // design system, donc `styles.highlight` est posé après la base du thème.
44
- contentContainerStyle: styleDeLaSurface(styles, stylesheet, { variant, styleFourni: customStyle }), children: _jsx(View, { onStartShouldSetResponder: () => true, children: renderNode(rows) }) }));
45
- return (_jsx(Prism, { CodeTag: View, PreTag: View, customStyle: {}, language: language, renderer: renderer, style: {}, wrapLongLines: true, children: children }));
44
+ contentContainerStyle: styleDeLaSurface(styles, stylesheet, { variant, styleFourni: customStyle }), children: _jsx(View, { style: styles.code, children: renderNode(rows) }) }));
45
+ return (_jsx(Prism, { CodeTag: View, PreTag: View, customStyle: {}, language: language, renderer: renderer, style: {}, children: children }));
46
46
  };
@@ -8,6 +8,16 @@ declare const _default: {
8
8
  styleFn: () => {
9
9
  highlightContainer: {
10
10
  width: "100%";
11
+ flexGrow: number;
12
+ flexShrink: number;
13
+ backgroundColor: string;
14
+ };
15
+ highlightContainerStandalone: {
16
+ borderRadius: import("@alveole/theme").Radius;
17
+ };
18
+ code: {
19
+ whiteSpace?: "pre" | undefined;
20
+ flexShrink: number;
11
21
  };
12
22
  highlight: {
13
23
  borderRadius: import("@alveole/theme").Radius;
@@ -15,13 +25,17 @@ declare const _default: {
15
25
  borderColor: string;
16
26
  overflow: "scroll";
17
27
  padding: import("@alveole/theme").Spacing;
18
- width: "100%";
28
+ minWidth: "100%";
29
+ flexGrow: number;
30
+ flexShrink: number;
19
31
  backgroundColor: string;
20
32
  };
21
33
  highlightEmbedded: {
22
34
  overflow: "scroll";
23
35
  padding: import("@alveole/theme").Spacing;
24
- width: "100%";
36
+ minWidth: "100%";
37
+ flexGrow: number;
38
+ flexShrink: number;
25
39
  backgroundColor: string;
26
40
  };
27
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Highlight.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAUkB;AAElB,eAAO,MAAM,aAAa,mCAEzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mCAE/B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAExB,CAAC;AAeF,eAAO,MAAM,aAAa,mCAA0D,CAAC;AAerF,eAAO,MAAM,aAAa,mCAA0D,CAAC;AAErF,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"Highlight.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAUkB;AAElB,eAAO,MAAM,aAAa,mCAEzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mCAE/B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAExB,CAAC;AAeF,eAAO,MAAM,aAAa,mCAA0D,CAAC;AAerF,eAAO,MAAM,aAAa,mCAA0D,CAAC;AAErF,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC"}
@@ -12,7 +12,7 @@ export default {
12
12
  };
13
13
  export const HighlightJSON = () => (_jsx(Highlight, { language: "json", children: JSON.stringify({ id: 'user_id_1', name: 'Jean-Pierre', age: 20 }, null, 2) }));
14
14
  export const HighlightTypescript = () => (_jsx(Highlight, { language: "typescript", children: "const id: string = 'user_id_1';" }));
15
- export const HighlightTSX = () => (_jsx(Highlight, { language: "tsx", children: `<Typography tag="span" p={spacing('2W')}>Bonjour</Typography>` }));
15
+ export const HighlightTSX = () => (_jsx(Highlight, { language: "tsx", children: `<Typography\n\ttag="span"\n\tp={spacing('2W')}\n>Bonjour</Typography>` }));
16
16
  const rubyCode = `# The Greeter class
17
17
  class Greeter
18
18
  def initialize(name)
@@ -1 +1 @@
1
- {"version":3,"file":"Highlight.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,cAA4K,CAAC;AAEvM,eAAO,MAAM,mBAAmB,cAAiJ,CAAC;AAElL,eAAO,MAAM,YAAY,cAAiK,CAAC;AAE3L,eAAO,MAAM,aAAa,cAAkG,CAAC;AAE7H,eAAO,MAAM,aAAa,cAAkG,CAAC;AAE7H,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"Highlight.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,cAA4K,CAAC;AAEvM,eAAO,MAAM,mBAAmB,cAAiJ,CAAC;AAElL,eAAO,MAAM,YAAY,cAA8K,CAAC;AAExM,eAAO,MAAM,aAAa,cAAkG,CAAC;AAE7H,eAAO,MAAM,aAAa,cAAkG,CAAC;AAE7H,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // Source: src/core/Highlight/Highlight.stories.tsx
3
3
  export const HighlightJSON = () => "export const HighlightJSON = () => (\n <Highlight language=\"json\">{JSON.stringify({ id: 'user_id_1', name: 'Jean-Pierre', age: 20 }, null, 2)}</Highlight>\n);";
4
4
  export const HighlightTypescript = () => "export const HighlightTypescript = () => (\n <Highlight language=\"typescript\">{\"const id: string = 'user_id_1';\"}</Highlight>\n);";
5
- export const HighlightTSX = () => "export const HighlightTSX = () => (\n <Highlight language=\"tsx\">{`<Typography tag=\"span\" p={spacing('2W')}>Bonjour</Typography>`}</Highlight>\n);";
5
+ export const HighlightTSX = () => "export const HighlightTSX = () => (\n <Highlight language=\"tsx\">{`<Typography\\n\\ttag=\"span\"\\n\\tp={spacing('2W')}\\n>Bonjour</Typography>`}</Highlight>\n);";
6
6
  export const HighlightRuby = () => "export const HighlightRuby = () => <Highlight language=\"ruby\">{rubyCode}</Highlight>;";
7
7
  export const HighlightHTML = () => "export const HighlightHTML = () => <Highlight language=\"html\">{htmlCode}</Highlight>;";
8
8
  export const storySources = {
@@ -1,6 +1,16 @@
1
1
  export declare const useStyles: () => {
2
2
  highlightContainer: {
3
3
  width: "100%";
4
+ flexGrow: number;
5
+ flexShrink: number;
6
+ backgroundColor: string;
7
+ };
8
+ highlightContainerStandalone: {
9
+ borderRadius: import("@alveole/theme").Radius;
10
+ };
11
+ code: {
12
+ whiteSpace?: "pre" | undefined;
13
+ flexShrink: number;
4
14
  };
5
15
  highlight: {
6
16
  borderRadius: import("@alveole/theme").Radius;
@@ -8,13 +18,17 @@ export declare const useStyles: () => {
8
18
  borderColor: string;
9
19
  overflow: "scroll";
10
20
  padding: import("@alveole/theme").Spacing;
11
- width: "100%";
21
+ minWidth: "100%";
22
+ flexGrow: number;
23
+ flexShrink: number;
12
24
  backgroundColor: string;
13
25
  };
14
26
  highlightEmbedded: {
15
27
  overflow: "scroll";
16
28
  padding: import("@alveole/theme").Spacing;
17
- width: "100%";
29
+ minWidth: "100%";
30
+ flexGrow: number;
31
+ flexShrink: number;
18
32
  backgroundColor: string;
19
33
  };
20
34
  };
@@ -1 +1 @@
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
+ {"version":3,"file":"Highlight.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Highlight/Highlight.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCpB,CAAC"}
@@ -4,12 +4,24 @@ export const useStyles = makeStyles(({ color, radius, spacingValue }) => {
4
4
  const base = {
5
5
  overflow: 'scroll',
6
6
  padding: spacingValue(Platform.OS === 'web' ? '2W' : '1W'),
7
- width: '100%',
7
+ minWidth: '100%',
8
+ flexGrow: 1,
9
+ flexShrink: 0,
8
10
  backgroundColor: color.light.background['alt-grey'],
9
11
  };
10
12
  return {
11
13
  highlightContainer: {
12
14
  width: '100%',
15
+ flexGrow: 0,
16
+ flexShrink: 0,
17
+ backgroundColor: color.light.background['alt-grey'],
18
+ },
19
+ highlightContainerStandalone: {
20
+ borderRadius: radius('md'),
21
+ },
22
+ code: {
23
+ flexShrink: 0,
24
+ ...(Platform.OS === 'web' && { whiteSpace: 'pre' }),
13
25
  },
14
26
  highlight: {
15
27
  ...base,
@@ -32,5 +32,5 @@ export const MarkdownDescription = ({ children, taille = 'MD', color: textColor
32
32
  linkColor,
33
33
  };
34
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 }) }));
35
+ return (_jsx(Box, { tag: "markdown-description", display: "flex", gap: 8, style: { alignSelf: 'stretch' }, children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm, replierLesCoupuresDeLigne], rehypePlugins: Platform.OS === 'web' ? [] : [preparerMarkdownNatif], skipHtml: Platform.OS !== 'web', components: components, children: children }) }));
36
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Metabase.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Metabase/Metabase.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCAEnB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"Metabase.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Metabase/Metabase.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,OAAO,mCAOnB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../Box';
2
3
  import { Metabase } from './Metabase';
3
4
  import { useStyles } from './Metabase.styles';
4
5
  export default {
5
6
  title: 'Metabase',
6
7
  tags: ['core'],
7
8
  experimental: false,
8
- description: "Intègre une page Metabase en passant l'url",
9
+ description: 'Intègre une page Metabase depuis son URL. Cet exemple charge le tableau de bord public de démonstration de Metabase et nécessite une connexion Internet.',
9
10
  component: Metabase,
10
11
  styleFn: useStyles,
11
12
  };
12
- export const Default = () => (_jsx(Metabase, { source: "https://spined-burst.metabaseapp.com/public/dashboard/a5f977a6-b6f4-4609-8e16-e422826c40ab" }));
13
+ export const Default = () => (_jsx(Box, { width: "100%", height: 600, children: _jsx(Metabase, { source: "https://embedded-analytics-sdk-demo.metabase.com/admin/analytics/i5s-lcGYLc1GyFdIy4TxH", title: "D\u00E9monstration Metabase : suivi des stocks et des commandes" }) }));
13
14
  export * as Sources from './Metabase.stories.sources';
@@ -1 +1 @@
1
- {"version":3,"file":"Metabase.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Metabase/Metabase.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAmK,CAAC;AAExL,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"Metabase.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/Metabase/Metabase.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAwS,CAAC;AAE7T,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // This file is generated. Do not edit manually.
2
2
  // Source: src/core/Metabase/Metabase.stories.tsx
3
- export const Default = () => "export const Default = () => (\n <Metabase source=\"https://spined-burst.metabaseapp.com/public/dashboard/a5f977a6-b6f4-4609-8e16-e422826c40ab\" />\n);";
3
+ export const Default = () => "export const Default = () => (\n <Box width=\"100%\" height={600}>\n <Metabase\n source=\"https://embedded-analytics-sdk-demo.metabase.com/admin/analytics/i5s-lcGYLc1GyFdIy4TxH\"\n title=\"Démonstration Metabase : suivi des stocks et des commandes\"\n />\n </Box>\n);";
4
4
  export const storySources = {
5
5
  Default,
6
6
  };
@@ -1,2 +1,2 @@
1
- export declare const ALVEOLE_COMPONENTS_VERSION: "2.0.0-alpha.12";
1
+ export declare const ALVEOLE_COMPONENTS_VERSION: "2.0.0-alpha.14";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const ALVEOLE_COMPONENTS_VERSION = "2.0.0-alpha.12";
1
+ export const ALVEOLE_COMPONENTS_VERSION = "2.0.0-alpha.14";
@@ -1 +1 @@
1
- {"version":3,"file":"ActionMenuItem.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAIlD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCA4CxD,CAAC"}
1
+ {"version":3,"file":"ActionMenuItem.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAIlD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCAkDxD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Pressable } from 'react-native';
2
+ import { Platform, Pressable } from 'react-native';
3
3
  import { Box } from '../../core/Box';
4
4
  import { fondAuSurvol } from '../../core/styleTamagui/fondAuSurvol';
5
5
  import { Typography } from '../../core/Typography';
@@ -12,7 +12,10 @@ export const ActionMenuItem = (props) => {
12
12
  const actionMenuItemStyles = useActionMenuItemStyles();
13
13
  const { forme, fond } = fondAuSurvol(selected ? styles.sidebarItemSelectedDesktop : {}, styles.sidebarItemHover.backgroundColor);
14
14
  const titleStyleSelected = selected ? styles.sidebarItemTitleSelectedDesktop : {};
15
- return (_jsx(Pressable, { accessibilityRole: "button", onPress: onPress, children: _jsx(Box, { tag: "action-menu-item", style: style, ...boxProps, children: _jsxs(Box, { style: { ...styles.sidebarItemContainerDesktop, ...actionMenuItemStyles.actionMenuItemContainerDesktop }, children: [selected && (_jsx(Box, { tag: "sidebar-item-indicator", style: styles.sidebarItemSelectedIndicator, children: _jsx(Box, { style: styles.sidebarItemSelectedIndicatorContent }) })), _jsxs(Box, { tag: "sidebar-item", style: { ...styles.sidebarItemDesktop, ...forme },
15
+ return (_jsx(Pressable, { accessibilityRole: "button", onPress: onPress,
16
+ // En natif, les vues Tamagui du libellé et du survol peuvent capter le toucher.
17
+ // Toute la ligne appartient au Pressable ; le web garde le survol de ses enfants.
18
+ pointerEvents: Platform.OS === 'web' ? 'auto' : 'box-only', children: _jsx(Box, { tag: "action-menu-item", style: style, ...boxProps, children: _jsxs(Box, { style: { ...styles.sidebarItemContainerDesktop, ...actionMenuItemStyles.actionMenuItemContainerDesktop }, children: [selected && (_jsx(Box, { tag: "sidebar-item-indicator", style: styles.sidebarItemSelectedIndicator, children: _jsx(Box, { style: styles.sidebarItemSelectedIndicatorContent }) })), _jsxs(Box, { tag: "sidebar-item", style: { ...styles.sidebarItemDesktop, ...forme },
16
19
  // L'entrée sélectionnée se survole comme les autres. Lui réserver une teinte propre
17
20
  // n'ajoutait qu'un cas particulier, et celle qui était posée valait son fond de repos :
18
21
  // le survol ne produisait rien.
@@ -14,5 +14,5 @@ export const BottomSheet = (props) => {
14
14
  const styles = useStyles();
15
15
  const { bottom } = useSafeAreaInsets();
16
16
  const snapPointsMode = fitContent ? 'fit' : 'percent';
17
- return (_jsx(Box, { tag: "sheet", style: styles.container, children: _jsxs(TamaguiSheet, { modal: true, open: open, onOpenChange: setOpen, snapPoints: fitContent ? undefined : points, snapPointsMode: snapPointsMode, dismissOnSnapToBottom: true, position: position, onPositionChange: setPosition, zIndex: 100000, ...animer('medium'), moveOnKeyboardChange: moveOnKeyboardChange, children: [_jsx(TamaguiSheet.Overlay, { style: styles.overlay }), _jsx(TamaguiSheet.Handle, { style: styles.handle }), _jsxs(TamaguiSheet.Container, { role: "dialog", "aria-modal": true, "aria-label": title, style: styles.sheetContainer, children: [_jsx(TamaguiSheet.Background, { style: styles.sheetBackground }), _jsxs(Box, { tag: "sheet-header", style: styles.header, children: [_jsx(Box, { children: _jsx(ButtonIcon, { icon: "X", variant: "tertiary", size: "md", accessibilityLabel: "Fermer", onPress: () => setOpen(false) }) }), _jsx(Box, { flex: 1, children: _jsx(Typography, { style: styles.title, children: title }) }), action && (_jsx(Box, { mt: 'auto', mb: 'auto', children: action }))] }), _jsx(Box, { pl: '2W', pr: '2W', children: _jsx(Divider, {}) }), _jsx(Box, { tag: "sheet-content", style: [styles.content, !fitContent && styles.contentFull], pb: bottom, children: children })] })] }) }));
17
+ return (_jsx(Box, { tag: "sheet", style: styles.container, children: _jsxs(TamaguiSheet, { modal: true, open: open, onOpenChange: setOpen, snapPoints: fitContent ? undefined : points, snapPointsMode: snapPointsMode, dismissOnSnapToBottom: true, position: position, onPositionChange: setPosition, zIndex: 100000, ...animer('medium'), moveOnKeyboardChange: moveOnKeyboardChange, children: [_jsx(TamaguiSheet.Overlay, { style: styles.overlay }), _jsxs(TamaguiSheet.Container, { role: "dialog", "aria-modal": true, "aria-label": title, style: styles.sheetContainer, children: [_jsx(TamaguiSheet.Background, { style: styles.sheetBackground }), _jsx(TamaguiSheet.Handle, { style: styles.handle }), _jsxs(Box, { tag: "sheet-header", style: styles.header, children: [_jsx(Box, { children: _jsx(ButtonIcon, { icon: "X", variant: "tertiary", size: "md", accessibilityLabel: "Fermer", onPress: () => setOpen(false) }) }), _jsx(Box, { flex: 1, children: _jsx(Typography, { style: styles.title, children: title }) }), action && (_jsx(Box, { mt: 'auto', mb: 'auto', children: action }))] }), _jsx(Box, { pl: '2W', pr: '2W', children: _jsx(Divider, {}) }), _jsx(Box, { tag: "sheet-content", style: [styles.content, !fitContent && styles.contentFull], pb: bottom, children: children })] })] }) }));
18
18
  };
@@ -26,10 +26,11 @@ declare const _default: {
26
26
  flexDirection: "row";
27
27
  };
28
28
  handle: {
29
- width: "90%";
30
- margin: string;
29
+ width: "100%";
30
+ margin: number;
31
31
  height: 16;
32
- backgroundColor: "#FFFFFF";
32
+ flexShrink: number;
33
+ backgroundColor: "transparent";
33
34
  };
34
35
  overlay: {
35
36
  backgroundColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCAcnB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAoBtB,CAAC;AAEF,eAAO,MAAM,UAAU,mCActB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"BottomSheet.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCAcnB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAoBtB,CAAC;AAEF,eAAO,MAAM,UAAU,mCActB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
@@ -20,10 +20,11 @@ export declare const useStyles: () => {
20
20
  flexDirection: "row";
21
21
  };
22
22
  handle: {
23
- width: "90%";
24
- margin: string;
23
+ width: "100%";
24
+ margin: number;
25
25
  height: 16;
26
- backgroundColor: "#FFFFFF";
26
+ flexShrink: number;
27
+ backgroundColor: "transparent";
27
28
  };
28
29
  overlay: {
29
30
  backgroundColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCnB,CAAC"}
1
+ {"version":3,"file":"BottomSheet.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCnB,CAAC"}
@@ -21,10 +21,11 @@ export const useStyles = makeStyles(({ spacing, text, color }) => ({
21
21
  flexDirection: 'row',
22
22
  },
23
23
  handle: {
24
- width: '90%',
25
- margin: 'auto',
24
+ width: '100%',
25
+ margin: 0,
26
26
  height: Spacings['2W'],
27
- backgroundColor: '#FFFFFF',
27
+ flexShrink: 0,
28
+ backgroundColor: 'transparent',
28
29
  },
29
30
  overlay: {
30
31
  backgroundColor: color.alpha(color.background.inverse, 0.5),
@@ -33,16 +33,16 @@ export default {
33
33
  *
34
34
  * Pour ce qui navigue, prendre `A`. Pour l'action discrète sans cadre, c'est `tertiary`.
35
35
  */
36
- export const Variants = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, children: [_jsx(Button, { variant: "primary", title: "Primary" }), _jsx(Button, { variant: "secondary", title: "Secondary" }), _jsx(Button, { variant: "tertiary", title: "Tertiary" }), _jsx(Button, { variant: "danger", title: "Danger" })] }));
36
+ export const Variants = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, children: [_jsx(Button, { variant: "primary", title: "Primary" }), _jsx(Button, { variant: "secondary", title: "Secondary" }), _jsx(Button, { variant: "tertiary", title: "Tertiary" }), _jsx(Button, { variant: "danger", title: "Danger" })] }));
37
37
  /** `md` par défaut. `sm` pour les zones denses, `lg` pour une action qu'on veut mettre en avant. */
38
- export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", style: { alignItems: 'center' }, gap: 24, children: [_jsx(Button, { variant: "secondary", size: "sm", title: "Sm" }), _jsx(Button, { variant: "secondary", size: "md", title: "Md" }), _jsx(Button, { variant: "secondary", size: "lg", title: "Lg" })] }));
38
+ export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', style: { alignItems: 'center' }, gap: 24, children: [_jsx(Button, { variant: "secondary", size: "sm", title: "Sm" }), _jsx(Button, { variant: "secondary", size: "md", title: "Md" }), _jsx(Button, { variant: "secondary", size: "lg", title: "Lg" })] }));
39
39
  /**
40
40
  * - `disabled` : l'action n'est pas disponible. Le bouton ne répond plus ni au clic ni au clavier.
41
41
  * - `selected` : le bouton fait partie d'un groupe et c'est lui qui est choisi.
42
42
  * - `expanded` : le bouton commande un menu ou un panneau actuellement déplié. Il pose aussi
43
43
  * l'état accessible correspondant, ce que `selected` ne fait pas.
44
44
  */
45
- export const States = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, children: [_jsx(Button, { variant: "secondary", title: "Default" }), _jsx(Button, { variant: "secondary", title: "Disabled", disabled: true }), _jsx(Button, { variant: "secondary", title: "Selected", selected: true }), _jsx(Button, { variant: "secondary", title: "Expanded", expanded: true })] }));
45
+ export const States = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, children: [_jsx(Button, { variant: "secondary", title: "Default" }), _jsx(Button, { variant: "secondary", title: "Disabled", disabled: true }), _jsx(Button, { variant: "secondary", title: "Selected", selected: true }), _jsx(Button, { variant: "secondary", title: "Expanded", expanded: true })] }));
46
46
  /**
47
47
  * Le spinner n'apparaît qu'après un délai, réglé par `loadingDelay` : mêmes valeurs que la
48
48
  * prop `delay` de `Spinner` (`false` / `true` / `'short'` (300 ms) / `'long'` / `number`).
@@ -71,7 +71,7 @@ export const Loading = () => {
71
71
  setIsLoading(true);
72
72
  setTimeout(() => setIsLoading(false), 3000);
73
73
  };
74
- return (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, children: [_jsx(Button, { variant: "primary", title: "Enregistrer", isLoading: isLoading, onPress: handlePress }), _jsx(Button, { variant: "secondary", title: "Exporter", leading: "Download", isLoading: isLoading, onPress: handlePress }), _jsx(Button, { variant: "primary", title: "D\u00E9lai court", loadingDelay: "short", isLoading: isLoading, onPress: handlePress })] }));
74
+ return (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, children: [_jsx(Button, { variant: "primary", title: "Enregistrer", isLoading: isLoading, onPress: handlePress }), _jsx(Button, { variant: "secondary", title: "Exporter", leading: "Download", isLoading: isLoading, onPress: handlePress }), _jsx(Button, { variant: "primary", title: "D\u00E9lai court", loadingDelay: "short", isLoading: isLoading, onPress: handlePress })] }));
75
75
  };
76
76
  /**
77
77
  * Un `onPress` qui rend une promesse verrouille le bouton jusqu'à sa fin, résolue ou rejetée :
@@ -90,16 +90,16 @@ export const OnPressAsynchrone = () => {
90
90
  setEnvois(n => n + 1);
91
91
  await new Promise(resolve => setTimeout(resolve, 3000));
92
92
  };
93
- return (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, style: { alignItems: 'center' }, children: [_jsx(Button, { variant: "primary", title: "Envoyer", loadingDelay: "short", onPress: envoyer }), _jsxs(Typography, { children: ["Envois : ", envois] })] }));
93
+ return (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, style: { alignItems: 'center' }, children: [_jsx(Button, { variant: "primary", title: "Envoyer", loadingDelay: "short", onPress: envoyer }), _jsxs(Typography, { children: ["Envois : ", envois] })] }));
94
94
  };
95
95
  /** `leading` place l’icône avant le libellé, `trailing` après. Les deux peuvent coexister. */
96
- export const Icons = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, children: [_jsx(Button, { variant: "secondary", title: "Leading", leading: "Plus" }), _jsx(Button, { variant: "secondary", title: "Trailing", trailing: "Download" }), _jsx(Button, { variant: "secondary", title: "Filtres", leading: "Plus", trailing: "ChevronDown" })] }));
96
+ export const Icons = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, children: [_jsx(Button, { variant: "secondary", title: "Leading", leading: "Plus" }), _jsx(Button, { variant: "secondary", title: "Trailing", trailing: "Download" }), _jsx(Button, { variant: "secondary", title: "Filtres", leading: "Plus", trailing: "ChevronDown" })] }));
97
97
  /**
98
98
  * `leading` et `trailing` acceptent aussi un élément : un avatar, un logo de réseau social.
99
99
  * Il est posé dans un emplacement de la taille de l'icône, sans recevoir de couleur, si bien
100
100
  * que le bouton garde sa hauteur et son alignement.
101
101
  */
102
- export const TertiaireAvecAvatar = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, style: { alignItems: 'center' }, children: [_jsx(Button, { variant: "tertiary", title: "Marie Curie", leading: _jsx(Avatar, { size: "xs", fallbackText: "Marie Curie" }) }), _jsx(Button, { variant: "tertiary", title: "Marie Curie", leading: "User" })] }));
102
+ export const TertiaireAvecAvatar = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, style: { alignItems: 'center' }, children: [_jsx(Button, { variant: "tertiary", title: "Marie Curie", leading: _jsx(Avatar, { size: "xs", fallbackText: "Marie Curie" }) }), _jsx(Button, { variant: "tertiary", title: "Marie Curie", leading: "User" })] }));
103
103
  /**
104
104
  * `ButtonIcon` est la **seule** façon d'obtenir un bouton carré. `Button` exige un `title` :
105
105
  * il ne bascule plus en mode icône seule quand on le lui retire.
@@ -116,7 +116,7 @@ export const TertiaireAvecAvatar = () => (_jsxs(Box, { display: "flex", flexDire
116
116
  * Il accepte `primary`, `secondary` et `tertiary`, et `iconSize` pour dissocier la taille de
117
117
  * l'icône de celle du bouton.
118
118
  */
119
- export const IconOnly = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 24, style: { alignItems: 'center' }, children: [_jsx(ButtonIcon, { variant: "tertiary", size: "sm", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "tertiary", size: "md", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "tertiary", size: "lg", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "secondary", size: "md", icon: "Trash", accessibilityLabel: "Supprimer" }), _jsx(ButtonIcon, { variant: "primary", size: "md", icon: "Plus", accessibilityLabel: "Ajouter" }), _jsx(ButtonIcon, { variant: "tertiary", size: "md", icon: "CircleUser", iconSize: "xs", accessibilityLabel: "Voir le profil" })] }));
119
+ export const IconOnly = () => (_jsxs(Box, { display: "flex", flexDirection: "row", flexWrap: 'wrap', gap: 24, style: { alignItems: 'center' }, children: [_jsx(ButtonIcon, { variant: "tertiary", size: "sm", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "tertiary", size: "md", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "tertiary", size: "lg", icon: "MoreHorizontal", accessibilityLabel: "Plus d'actions" }), _jsx(ButtonIcon, { variant: "secondary", size: "md", icon: "Trash", accessibilityLabel: "Supprimer" }), _jsx(ButtonIcon, { variant: "primary", size: "md", icon: "Plus", accessibilityLabel: "Ajouter" }), _jsx(ButtonIcon, { variant: "tertiary", size: "md", icon: "CircleUser", iconSize: "xs", accessibilityLabel: "Voir le profil" })] }));
120
120
  /** Le bouton remplit la largeur de son parent, au lieu de s'ajuster à son contenu. */
121
121
  export const FullWidth = () => _jsx(Button, { variant: "primary", title: "Full Width", fullWidth: true });
122
122
  export * as Sources from './Button.stories.sources';
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,cAA6U,CAAC;AAEnW,eAAO,MAAM,KAAK,cAA4U,CAAC;AAE/V,eAAO,MAAM,MAAM,cAA6W,CAAC;AAEjY,eAAO,MAAM,OAAO,cAAypB,CAAC;AAE9qB,eAAO,MAAM,iBAAiB,cAA2f,CAAC;AAE1hB,eAAO,MAAM,KAAK,cAAwW,CAAC;AAE3X,eAAO,MAAM,mBAAmB,cAAkW,CAAC;AAEnY,eAAO,MAAM,QAAQ,cAAizB,CAAC;AAEv0B,eAAO,MAAM,SAAS,cAAwG,CAAC;AAE/H,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAUtE,CAAC"}
1
+ {"version":3,"file":"Button.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,cAA+V,CAAC;AAErX,eAAO,MAAM,KAAK,cAA8V,CAAC;AAEjX,eAAO,MAAM,MAAM,cAA+X,CAAC;AAEnZ,eAAO,MAAM,OAAO,cAA2qB,CAAC;AAEhsB,eAAO,MAAM,iBAAiB,cAA6gB,CAAC;AAE5iB,eAAO,MAAM,KAAK,cAA0X,CAAC;AAE7Y,eAAO,MAAM,mBAAmB,cAAoX,CAAC;AAErZ,eAAO,MAAM,QAAQ,cAAm0B,CAAC;AAEz1B,eAAO,MAAM,SAAS,cAAwG,CAAC;AAE/H,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAUtE,CAAC"}
@@ -1,13 +1,13 @@
1
1
  // This file is generated. Do not edit manually.
2
2
  // Source: src/ui/Button/Button.stories.tsx
3
- export const Variants = () => "export const Variants = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={24}>\n <Button variant=\"primary\" title=\"Primary\" />\n <Button variant=\"secondary\" title=\"Secondary\" />\n <Button variant=\"tertiary\" title=\"Tertiary\" />\n <Button variant=\"danger\" title=\"Danger\" />\n </Box>\n);";
4
- export const Sizes = () => "export const Sizes = () => (\n <Box display=\"flex\" flexDirection=\"row\" style={{ alignItems: 'center' }} gap={24}>\n <Button variant=\"secondary\" size=\"sm\" title=\"Sm\" />\n <Button variant=\"secondary\" size=\"md\" title=\"Md\" />\n <Button variant=\"secondary\" size=\"lg\" title=\"Lg\" />\n </Box>\n);";
5
- export const States = () => "export const States = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={24}>\n <Button variant=\"secondary\" title=\"Default\" />\n <Button variant=\"secondary\" title=\"Disabled\" disabled />\n <Button variant=\"secondary\" title=\"Selected\" selected />\n <Button variant=\"secondary\" title=\"Expanded\" expanded />\n </Box>\n);";
6
- export const Loading = () => "export const Loading = () => {\n const [isLoading, setIsLoading] = React.useState(false);\n\n const handlePress = () => {\n setIsLoading(true);\n setTimeout(() => setIsLoading(false), 3000);\n };\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" gap={24}>\n <Button variant=\"primary\" title=\"Enregistrer\" isLoading={isLoading} onPress={handlePress} />\n <Button variant=\"secondary\" title=\"Exporter\" leading=\"Download\" isLoading={isLoading} onPress={handlePress} />\n <Button variant=\"primary\" title=\"Délai court\" loadingDelay=\"short\" isLoading={isLoading} onPress={handlePress} />\n </Box>\n );\n};";
7
- export const OnPressAsynchrone = () => "export const OnPressAsynchrone = () => {\n const [envois, setEnvois] = React.useState(0);\n\n const envoyer = async () => {\n setEnvois(n => n + 1);\n await new Promise(resolve => setTimeout(resolve, 3000));\n };\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" gap={24} style={{ alignItems: 'center' }}>\n <Button variant=\"primary\" title=\"Envoyer\" loadingDelay=\"short\" onPress={envoyer} />\n <Typography>Envois : {envois}</Typography>\n </Box>\n );\n};";
8
- export const Icons = () => "export const Icons = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={24}>\n <Button variant=\"secondary\" title=\"Leading\" leading=\"Plus\" />\n <Button variant=\"secondary\" title=\"Trailing\" trailing=\"Download\" />\n <Button variant=\"secondary\" title=\"Filtres\" leading=\"Plus\" trailing=\"ChevronDown\" />\n </Box>\n);";
9
- export const TertiaireAvecAvatar = () => "export const TertiaireAvecAvatar = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={24} style={{ alignItems: 'center' }}>\n <Button variant=\"tertiary\" title=\"Marie Curie\" leading={<Avatar size=\"xs\" fallbackText=\"Marie Curie\" />} />\n <Button variant=\"tertiary\" title=\"Marie Curie\" leading=\"User\" />\n </Box>\n);";
10
- export const IconOnly = () => "export const IconOnly = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={24} style={{ alignItems: 'center' }}>\n <ButtonIcon variant=\"tertiary\" size=\"sm\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"tertiary\" size=\"md\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"tertiary\" size=\"lg\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"secondary\" size=\"md\" icon=\"Trash\" accessibilityLabel=\"Supprimer\" />\n <ButtonIcon variant=\"primary\" size=\"md\" icon=\"Plus\" accessibilityLabel=\"Ajouter\" />\n <ButtonIcon variant=\"tertiary\" size=\"md\" icon=\"CircleUser\" iconSize=\"xs\" accessibilityLabel=\"Voir le profil\" />\n </Box>\n);";
3
+ export const Variants = () => "export const Variants = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24}>\n <Button variant=\"primary\" title=\"Primary\" />\n <Button variant=\"secondary\" title=\"Secondary\" />\n <Button variant=\"tertiary\" title=\"Tertiary\" />\n <Button variant=\"danger\" title=\"Danger\" />\n </Box>\n);";
4
+ export const Sizes = () => "export const Sizes = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} style={{ alignItems: 'center' }} gap={24}>\n <Button variant=\"secondary\" size=\"sm\" title=\"Sm\" />\n <Button variant=\"secondary\" size=\"md\" title=\"Md\" />\n <Button variant=\"secondary\" size=\"lg\" title=\"Lg\" />\n </Box>\n);";
5
+ export const States = () => "export const States = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24}>\n <Button variant=\"secondary\" title=\"Default\" />\n <Button variant=\"secondary\" title=\"Disabled\" disabled />\n <Button variant=\"secondary\" title=\"Selected\" selected />\n <Button variant=\"secondary\" title=\"Expanded\" expanded />\n </Box>\n);";
6
+ export const Loading = () => "export const Loading = () => {\n const [isLoading, setIsLoading] = React.useState(false);\n\n const handlePress = () => {\n setIsLoading(true);\n setTimeout(() => setIsLoading(false), 3000);\n };\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24}>\n <Button variant=\"primary\" title=\"Enregistrer\" isLoading={isLoading} onPress={handlePress} />\n <Button variant=\"secondary\" title=\"Exporter\" leading=\"Download\" isLoading={isLoading} onPress={handlePress} />\n <Button variant=\"primary\" title=\"Délai court\" loadingDelay=\"short\" isLoading={isLoading} onPress={handlePress} />\n </Box>\n );\n};";
7
+ export const OnPressAsynchrone = () => "export const OnPressAsynchrone = () => {\n const [envois, setEnvois] = React.useState(0);\n\n const envoyer = async () => {\n setEnvois(n => n + 1);\n await new Promise(resolve => setTimeout(resolve, 3000));\n };\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24} style={{ alignItems: 'center' }}>\n <Button variant=\"primary\" title=\"Envoyer\" loadingDelay=\"short\" onPress={envoyer} />\n <Typography>Envois : {envois}</Typography>\n </Box>\n );\n};";
8
+ export const Icons = () => "export const Icons = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24}>\n <Button variant=\"secondary\" title=\"Leading\" leading=\"Plus\" />\n <Button variant=\"secondary\" title=\"Trailing\" trailing=\"Download\" />\n <Button variant=\"secondary\" title=\"Filtres\" leading=\"Plus\" trailing=\"ChevronDown\" />\n </Box>\n);";
9
+ export const TertiaireAvecAvatar = () => "export const TertiaireAvecAvatar = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24} style={{ alignItems: 'center' }}>\n <Button variant=\"tertiary\" title=\"Marie Curie\" leading={<Avatar size=\"xs\" fallbackText=\"Marie Curie\" />} />\n <Button variant=\"tertiary\" title=\"Marie Curie\" leading=\"User\" />\n </Box>\n);";
10
+ export const IconOnly = () => "export const IconOnly = () => (\n <Box display=\"flex\" flexDirection=\"row\" flexWrap={'wrap'} gap={24} style={{ alignItems: 'center' }}>\n <ButtonIcon variant=\"tertiary\" size=\"sm\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"tertiary\" size=\"md\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"tertiary\" size=\"lg\" icon=\"MoreHorizontal\" accessibilityLabel=\"Plus d'actions\" />\n <ButtonIcon variant=\"secondary\" size=\"md\" icon=\"Trash\" accessibilityLabel=\"Supprimer\" />\n <ButtonIcon variant=\"primary\" size=\"md\" icon=\"Plus\" accessibilityLabel=\"Ajouter\" />\n <ButtonIcon variant=\"tertiary\" size=\"md\" icon=\"CircleUser\" iconSize=\"xs\" accessibilityLabel=\"Voir le profil\" />\n </Box>\n);";
11
11
  export const FullWidth = () => "export const FullWidth = () => <Button variant=\"primary\" title=\"Full Width\" fullWidth />;";
12
12
  export const storySources = {
13
13
  Variants,
@@ -26,7 +26,7 @@ declare const _default: {
26
26
  letterSpacing: 0;
27
27
  fontFamily: string;
28
28
  fontWeight?: import("react-native").TextStyle["fontWeight"];
29
- width: "100%";
29
+ width?: "100%" | undefined;
30
30
  };
31
31
  labelSm: {
32
32
  fontSize: 14;
@@ -46,6 +46,7 @@ declare const _default: {
46
46
  color: string;
47
47
  };
48
48
  checkbox: {
49
+ flexShrink: number;
49
50
  height: import("@alveole/theme").Spacing;
50
51
  width: import("@alveole/theme").Spacing;
51
52
  backgroundColor: "transparent";
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCASnB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAKjB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCAcnB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAUjB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}