@alveole/components 0.13.2 → 0.14.1

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 (91) hide show
  1. package/dist/core/Image/Image.d.ts +11 -0
  2. package/dist/core/Image/Image.d.ts.map +1 -0
  3. package/dist/core/Image/Image.js +79 -0
  4. package/dist/core/Image/Image.stories.d.ts +21 -0
  5. package/dist/core/Image/Image.stories.d.ts.map +1 -0
  6. package/dist/core/Image/Image.stories.js +45 -0
  7. package/dist/core/Image/Image.style.d.ts +6 -0
  8. package/dist/core/Image/Image.style.d.ts.map +1 -0
  9. package/dist/core/Image/Image.style.js +6 -0
  10. package/dist/core/Image/index.d.ts +2 -0
  11. package/dist/core/Image/index.d.ts.map +1 -0
  12. package/dist/core/Image/index.js +1 -0
  13. package/dist/core/Metabase/Metabase.d.ts +11 -0
  14. package/dist/core/Metabase/Metabase.d.ts.map +1 -0
  15. package/dist/core/Metabase/Metabase.js +17 -0
  16. package/dist/core/Metabase/Metabase.stories.d.ts +20 -0
  17. package/dist/core/Metabase/Metabase.stories.d.ts.map +1 -0
  18. package/dist/core/Metabase/Metabase.stories.js +12 -0
  19. package/dist/core/Metabase/Metabase.styles.d.ts +11 -0
  20. package/dist/core/Metabase/Metabase.styles.d.ts.map +1 -0
  21. package/dist/core/Metabase/Metabase.styles.js +12 -0
  22. package/dist/core/Metabase/Metabase.web.d.ts +20 -0
  23. package/dist/core/Metabase/Metabase.web.d.ts.map +1 -0
  24. package/dist/core/Metabase/Metabase.web.js +53 -0
  25. package/dist/core/Metabase/index.d.ts +2 -0
  26. package/dist/core/Metabase/index.d.ts.map +1 -0
  27. package/dist/core/Metabase/index.js +1 -0
  28. package/dist/core/Version/Version.d.ts +5 -0
  29. package/dist/core/Version/Version.d.ts.map +1 -0
  30. package/dist/core/Version/Version.js +15 -0
  31. package/dist/core/Version/Version.stories.d.ts +21 -0
  32. package/dist/core/Version/Version.stories.d.ts.map +1 -0
  33. package/dist/core/Version/Version.stories.js +12 -0
  34. package/dist/core/Version/Version.styles.d.ts +12 -0
  35. package/dist/core/Version/Version.styles.d.ts.map +1 -0
  36. package/dist/core/Version/Version.styles.js +9 -0
  37. package/dist/core/Version/index.d.ts +2 -0
  38. package/dist/core/Version/index.d.ts.map +1 -0
  39. package/dist/core/Version/index.js +1 -0
  40. package/dist/core/index.d.ts +3 -0
  41. package/dist/core/index.d.ts.map +1 -1
  42. package/dist/core/index.js +3 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +1 -0
  46. package/dist/stories/index.d.ts +6 -0
  47. package/dist/stories/index.d.ts.map +1 -1
  48. package/dist/stories/index.js +8 -0
  49. package/dist/ui/Button/Button.d.ts +31 -0
  50. package/dist/ui/Button/Button.d.ts.map +1 -0
  51. package/dist/ui/Button/Button.js +141 -0
  52. package/dist/ui/Button/Button.stories.d.ts +249 -0
  53. package/dist/ui/Button/Button.stories.d.ts.map +1 -0
  54. package/dist/ui/Button/Button.stories.js +20 -0
  55. package/dist/ui/Button/Button.styles.d.ts +222 -0
  56. package/dist/ui/Button/Button.styles.d.ts.map +1 -0
  57. package/dist/ui/Button/Button.styles.js +194 -0
  58. package/dist/ui/Button/ButtonIcon.d.ts +26 -0
  59. package/dist/ui/Button/ButtonIcon.d.ts.map +1 -0
  60. package/dist/ui/Button/ButtonIcon.js +100 -0
  61. package/dist/ui/Button/index.d.ts +3 -0
  62. package/dist/ui/Button/index.d.ts.map +1 -0
  63. package/dist/ui/Button/index.js +2 -0
  64. package/dist/ui/Divider/Divider.d.ts +4 -0
  65. package/dist/ui/Divider/Divider.d.ts.map +1 -0
  66. package/dist/ui/Divider/Divider.js +7 -0
  67. package/dist/ui/Divider/Divider.stories.d.ts +18 -0
  68. package/dist/ui/Divider/Divider.stories.d.ts.map +1 -0
  69. package/dist/ui/Divider/Divider.stories.js +13 -0
  70. package/dist/ui/Divider/Divider.styles.d.ts +8 -0
  71. package/dist/ui/Divider/Divider.styles.d.ts.map +1 -0
  72. package/dist/ui/Divider/Divider.styles.js +8 -0
  73. package/dist/ui/Divider/index.d.ts +2 -0
  74. package/dist/ui/Divider/index.d.ts.map +1 -0
  75. package/dist/ui/Divider/index.js +1 -0
  76. package/dist/ui/LucideIcon/LucideIcon.d.ts +5 -0
  77. package/dist/ui/LucideIcon/LucideIcon.d.ts.map +1 -0
  78. package/dist/ui/LucideIcon/LucideIcon.js +23 -0
  79. package/dist/ui/LucideIcon/LucideIcon.props.d.ts +4135 -0
  80. package/dist/ui/LucideIcon/LucideIcon.props.d.ts.map +1 -0
  81. package/dist/ui/LucideIcon/LucideIcon.props.js +9 -0
  82. package/dist/ui/LucideIcon/LucideIcon.stories.d.ts +2073 -0
  83. package/dist/ui/LucideIcon/LucideIcon.stories.d.ts.map +1 -0
  84. package/dist/ui/LucideIcon/LucideIcon.stories.js +16 -0
  85. package/dist/ui/LucideIcon/index.d.ts +3 -0
  86. package/dist/ui/LucideIcon/index.d.ts.map +1 -0
  87. package/dist/ui/LucideIcon/index.js +2 -0
  88. package/dist/ui/index.d.ts +4 -0
  89. package/dist/ui/index.d.ts.map +1 -0
  90. package/dist/ui/index.js +3 -0
  91. package/package.json +7 -2
@@ -0,0 +1,141 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ActivityIndicator, Pressable } from 'react-native';
4
+ import { Box, Typography } from '../../core';
5
+ import { LucideIcon } from '../LucideIcon';
6
+ import { useStyles } from './Button.styles';
7
+ export const Button = React.forwardRef(function Button(props, ref) {
8
+ const { title, type, size, variant, disabled, startIcon, endIcon, noPadding, borderNone, leftAlign, isLoading, ContainerProps = {}, ...buttonProps } = props;
9
+ const { style, hoverStyle, ...containerProps } = ContainerProps;
10
+ const styles = useStyles();
11
+ const containerSize = size === 'sm'
12
+ ? styles.smContainer
13
+ : size === 'lg'
14
+ ? styles.lgContainer
15
+ : size === 'xs'
16
+ ? styles.xsContainer
17
+ : styles.mdContainer;
18
+ const titleSize = size === 'sm' ? styles.smTitle : size === 'lg' ? styles.lgTitle : size === 'xs' ? styles.xsTitle : styles.mdTitle;
19
+ const noPaddingStyle = { paddingTop: 0, paddingBottom: 0, paddingLeft: 0, paddingRight: 0 };
20
+ const buttonContainerStyle = () => {
21
+ let applicableStyles = {
22
+ ...styles.container,
23
+ ...(startIcon
24
+ ? size === 'sm'
25
+ ? styles.smContainerStartIcon
26
+ : size === 'lg'
27
+ ? styles.lgContainerStartIcon
28
+ : styles.mdContainerStartIcon
29
+ : {}),
30
+ ...(endIcon
31
+ ? size === 'sm'
32
+ ? styles.smContainerEndIcon
33
+ : size === 'lg'
34
+ ? styles.lgContainerEndIcon
35
+ : styles.mdContainerEndIcon
36
+ : {}),
37
+ };
38
+ if (variant === 'primary') {
39
+ applicableStyles = { ...applicableStyles, ...styles.primaryContainer };
40
+ if (disabled)
41
+ applicableStyles = { ...applicableStyles, ...styles.primaryContainerDisabled };
42
+ }
43
+ else if (variant === 'secondary') {
44
+ applicableStyles = { ...applicableStyles, ...styles.secondaryContainer };
45
+ if (disabled)
46
+ applicableStyles = { ...applicableStyles, ...styles.secondaryContainerDisabled };
47
+ }
48
+ else if (variant === 'tertiary') {
49
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryContainer };
50
+ if (disabled)
51
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryContainerDisabled };
52
+ }
53
+ else if (variant === 'link') {
54
+ applicableStyles = { ...applicableStyles, ...styles.linkContainer };
55
+ if (disabled)
56
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryContainerDisabled };
57
+ }
58
+ return {
59
+ ...applicableStyles,
60
+ ...containerSize,
61
+ ...(noPadding ? noPaddingStyle : {}),
62
+ ...(borderNone ? { borderRadius: 0 } : {}),
63
+ ...(leftAlign ? { justifyContent: 'left' } : {}),
64
+ };
65
+ };
66
+ const buttonContainerHoverStyle = () => {
67
+ if (disabled)
68
+ return {};
69
+ if (variant === 'primary')
70
+ return styles.primaryContainerHover;
71
+ else if (variant === 'secondary')
72
+ return styles.secondaryContainerHover;
73
+ else if (variant === 'tertiary')
74
+ return styles.tertiaryContainerHover;
75
+ else if (variant === 'link')
76
+ return styles.linkContainerHover;
77
+ };
78
+ const textStyle = (state) => {
79
+ let applicableStyles = styles.title;
80
+ if (variant === 'primary') {
81
+ applicableStyles = { ...applicableStyles, ...styles.primaryTitle };
82
+ if (disabled)
83
+ applicableStyles = { ...applicableStyles, ...styles.primaryTitleDisabled };
84
+ else if (state.hovered)
85
+ applicableStyles = { ...applicableStyles, ...styles.primaryTitleHover };
86
+ }
87
+ else if (variant === 'secondary') {
88
+ applicableStyles = { ...applicableStyles, ...styles.secondaryTitle };
89
+ if (disabled)
90
+ applicableStyles = { ...applicableStyles, ...styles.secondaryTitleDisabled };
91
+ else if (state.hovered)
92
+ applicableStyles = { ...applicableStyles, ...styles.secondaryTitleHover };
93
+ }
94
+ else if (variant === 'tertiary') {
95
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryTitle };
96
+ if (disabled)
97
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryTitleDisabled };
98
+ else if (state.hovered)
99
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryTitleHover };
100
+ }
101
+ else if (variant === 'link') {
102
+ applicableStyles = { ...applicableStyles, ...styles.linkTitle };
103
+ if (disabled)
104
+ applicableStyles = { ...applicableStyles, ...styles.tertiaryTitleDisabled };
105
+ else if (state.hovered)
106
+ applicableStyles = { ...applicableStyles, ...styles.linkTitleHover };
107
+ }
108
+ return { ...applicableStyles, ...titleSize };
109
+ };
110
+ const iconStyle = (state) => {
111
+ const iconSize = size === 'lg' ? 'md' : 'sm';
112
+ if (variant === 'primary') {
113
+ if (disabled)
114
+ return { size: iconSize, color: styles.primaryIconDisabled.color };
115
+ else if (state.hovered)
116
+ return { size: iconSize, color: styles.primaryIconHover.color };
117
+ return { size: iconSize, color: styles.primaryIcon.color };
118
+ }
119
+ else if (variant === 'secondary') {
120
+ if (disabled)
121
+ return { size: iconSize, color: styles.secondaryIconDisabled.color };
122
+ else if (state.hovered)
123
+ return { size: iconSize, color: styles.secondaryIconHover.color };
124
+ return { size: iconSize, color: styles.secondaryIcon.color };
125
+ }
126
+ else if (variant === 'tertiary') {
127
+ if (disabled)
128
+ return { size: iconSize, color: styles.tertiaryIconDisabled.color };
129
+ else if (state.hovered)
130
+ return { size: iconSize, color: styles.tertiaryIconHover.color };
131
+ return { size: iconSize, color: styles.tertiaryIcon.color };
132
+ }
133
+ else if (variant === 'link') {
134
+ if (state.hovered)
135
+ return { size: iconSize, color: styles.linkTitleHover.color };
136
+ return { size: iconSize, color: styles.linkIcon.color };
137
+ }
138
+ return { size: iconSize };
139
+ };
140
+ return (_jsx(Pressable, { ref: ref, disabled: disabled, accessibilityRole: "button", ...(type === 'submit' ? { 'aria-selected': true } : {}), ...buttonProps, children: (state) => (_jsxs(Box, { style: [buttonContainerStyle(), style], hoverStyle: { ...buttonContainerHoverStyle(), ...hoverStyle }, ...containerProps, children: [startIcon && _jsx(LucideIcon, { name: startIcon, ...iconStyle({ hovered: !!state.hovered }) }), _jsx(Typography, { "user-select": false, style: textStyle({ hovered: !!state.hovered }), children: title }), isLoading ? (_jsx(ActivityIndicator, { size: "small", style: styles.buttonLoader })) : (endIcon && _jsx(LucideIcon, { name: endIcon, ...iconStyle({ hovered: !!state.hovered }) }))] })) }));
141
+ });
@@ -0,0 +1,249 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ figmaURL: string;
6
+ description: string;
7
+ component: import("react").ForwardRefExoticComponent<Omit<import("react-native").PressableProps, "children" | "style"> & {
8
+ title: string;
9
+ size?: "xs" | "sm" | "md" | "lg";
10
+ variant: "primary" | "secondary" | "tertiary" | "link";
11
+ startIcon?: import("..").IconProps["name"];
12
+ endIcon?: import("..").IconProps["name"];
13
+ ContainerProps?: import("../..").BoxProps;
14
+ noPadding?: boolean;
15
+ borderNone?: boolean;
16
+ leftAlign?: boolean;
17
+ type?: "button" | "submit";
18
+ isLoading?: boolean;
19
+ } & import("react").RefAttributes<import("react-native").View>>;
20
+ styleFn: () => {
21
+ container: {
22
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
23
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
24
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
25
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
26
+ display: "flex";
27
+ flexDirection: "row";
28
+ justifyContent: "center";
29
+ alignItems: "center";
30
+ gap: import("@alveole/theme").Spacing;
31
+ marginTop: string;
32
+ marginBottom: string;
33
+ };
34
+ buttonLoader: {
35
+ position: "absolute";
36
+ right: import("@alveole/theme").Spacing;
37
+ };
38
+ title: {
39
+ cursor: "pointer";
40
+ minWidth: import("@alveole/theme").Spacing;
41
+ textAlign: "center";
42
+ };
43
+ primaryTitle: {
44
+ color: "#F2F9FF";
45
+ };
46
+ primaryContainer: {
47
+ backgroundColor: "#002764";
48
+ } | {
49
+ shadowColor: import("@alveole/theme").Color;
50
+ shadowOffset: {
51
+ width: number;
52
+ height: number;
53
+ };
54
+ shadowOpacity: number;
55
+ shadowRadius: number;
56
+ elevation: number;
57
+ backgroundColor: "#002764";
58
+ } | {
59
+ boxShadow: string;
60
+ backgroundColor: "#002764";
61
+ };
62
+ primaryTitleHover: {
63
+ color: "#F2F9FF";
64
+ };
65
+ primaryContainerHover: {
66
+ backgroundColor: "#0048AC";
67
+ };
68
+ secondaryTitle: {
69
+ color: "#151617";
70
+ };
71
+ secondaryContainer: {
72
+ borderWidth: number;
73
+ borderColor: "#DEE3EC";
74
+ backgroundColor: "#FFFFFF";
75
+ };
76
+ secondaryTitleHover: {
77
+ color: "#151617";
78
+ };
79
+ secondaryContainerHover: {
80
+ borderColor: "#DEE3EC";
81
+ backgroundColor: "rgba(0, 0, 0, 0.04)";
82
+ };
83
+ tertiaryTitle: {
84
+ color: "#151617";
85
+ };
86
+ tertiaryContainer: {};
87
+ tertiaryTitleHover: {
88
+ color: "#151617";
89
+ };
90
+ tertiaryContainerHover: {
91
+ backgroundColor: "rgba(0, 0, 0, 0.04)";
92
+ };
93
+ linkTitle: {
94
+ color: "#076D8A";
95
+ };
96
+ linkContainer: {
97
+ backgroundColor: "transparent";
98
+ };
99
+ linkTitleHover: {
100
+ color: "#076D8A";
101
+ };
102
+ linkContainerHover: {
103
+ backgroundColor: "transparent";
104
+ };
105
+ xsContainer: {
106
+ paddingLeft: import("@alveole/theme").Spacing;
107
+ paddingRight: import("@alveole/theme").Spacing;
108
+ paddingTop: import("@alveole/theme").Spacing;
109
+ paddingBottom: import("@alveole/theme").Spacing;
110
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
111
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
112
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
113
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
114
+ };
115
+ smContainer: {
116
+ paddingLeft: import("@alveole/theme").Spacing;
117
+ paddingRight: import("@alveole/theme").Spacing;
118
+ paddingTop: import("@alveole/theme").Spacing;
119
+ paddingBottom: import("@alveole/theme").Spacing;
120
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
121
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
122
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
123
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
124
+ };
125
+ mdContainer: {
126
+ paddingLeft: import("@alveole/theme").Spacing;
127
+ paddingRight: import("@alveole/theme").Spacing;
128
+ paddingTop: number;
129
+ paddingBottom: number;
130
+ };
131
+ lgContainer: {
132
+ paddingLeft: import("@alveole/theme").Spacing;
133
+ paddingRight: import("@alveole/theme").Spacing;
134
+ paddingTop: import("@alveole/theme").Spacing;
135
+ paddingBottom: import("@alveole/theme").Spacing;
136
+ };
137
+ smContainerIconOnly: {
138
+ padding: import("@alveole/theme").Spacing;
139
+ };
140
+ mdContainerIconOnly: {
141
+ padding: import("@alveole/theme").Spacing;
142
+ };
143
+ lgContainerIconOnly: {
144
+ padding: import("@alveole/theme").Spacing;
145
+ };
146
+ xsTitle: {
147
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
148
+ readonly fontSize: 12;
149
+ readonly lineHeight: 20;
150
+ readonly letterSpacing: 0;
151
+ };
152
+ smTitle: {
153
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
154
+ readonly fontSize: 14;
155
+ readonly lineHeight: 20;
156
+ readonly letterSpacing: 0;
157
+ };
158
+ mdTitle: {
159
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
160
+ readonly fontSize: 14;
161
+ readonly lineHeight: 20;
162
+ readonly letterSpacing: 0;
163
+ };
164
+ lgTitle: {
165
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
166
+ readonly fontSize: 16;
167
+ readonly lineHeight: 24;
168
+ readonly letterSpacing: 0;
169
+ };
170
+ smContainerStartIcon: {
171
+ paddingLeft: import("@alveole/theme").Spacing;
172
+ };
173
+ mdContainerStartIcon: {
174
+ paddingLeft: import("@alveole/theme").Spacing;
175
+ };
176
+ lgContainerStartIcon: {
177
+ paddingLeft: import("@alveole/theme").Spacing;
178
+ };
179
+ smContainerEndIcon: {
180
+ paddingRight: import("@alveole/theme").Spacing;
181
+ };
182
+ mdContainerEndIcon: {
183
+ paddingRight: import("@alveole/theme").Spacing;
184
+ };
185
+ lgContainerEndIcon: {
186
+ paddingRight: import("@alveole/theme").Spacing;
187
+ };
188
+ primaryTitleDisabled: {
189
+ cursor: "not-allowed";
190
+ color: "#8D97AC";
191
+ };
192
+ primaryContainerDisabled: {
193
+ cursor: "not-allowed";
194
+ backgroundColor: "#E6EAF1";
195
+ };
196
+ secondaryTitleDisabled: {
197
+ cursor: "not-allowed";
198
+ color: "#8D97AC";
199
+ };
200
+ secondaryContainerDisabled: {
201
+ cursor: "not-allowed";
202
+ };
203
+ tertiaryTitleDisabled: {
204
+ cursor: "not-allowed";
205
+ color: "#8D97AC";
206
+ };
207
+ tertiaryContainerDisabled: {
208
+ cursor: "not-allowed";
209
+ };
210
+ primaryIcon: {
211
+ color: "#F2F9FF";
212
+ };
213
+ primaryIconHover: {
214
+ color: "#F2F9FF";
215
+ };
216
+ primaryIconDisabled: {
217
+ color: "#8D97AC";
218
+ };
219
+ secondaryIcon: {
220
+ color: "#151617";
221
+ };
222
+ secondaryIconHover: {
223
+ color: "#151617";
224
+ };
225
+ secondaryIconDisabled: {
226
+ color: "#8D97AC";
227
+ };
228
+ tertiaryIcon: {
229
+ color: "#151617";
230
+ };
231
+ tertiaryIconHover: {
232
+ color: "#151617";
233
+ };
234
+ tertiaryIconDisabled: {
235
+ color: "#8D97AC";
236
+ };
237
+ linkIcon: {
238
+ color: "#076D8A";
239
+ };
240
+ };
241
+ };
242
+ export default _default;
243
+ export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
244
+ export declare const Primary: () => import("react/jsx-runtime").JSX.Element;
245
+ export declare const Secondary: () => import("react/jsx-runtime").JSX.Element;
246
+ export declare const Tertiary: () => import("react/jsx-runtime").JSX.Element;
247
+ export declare const Link: () => import("react/jsx-runtime").JSX.Element;
248
+ export declare const Icons: () => import("react/jsx-runtime").JSX.Element;
249
+ //# sourceMappingURL=Button.stories.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '../../core';
3
+ import { Button } from './Button';
4
+ import { useStyles } from './Button.styles';
5
+ import { ButtonIcon } from './ButtonIcon';
6
+ export default {
7
+ title: 'Button',
8
+ tags: ['Kit'],
9
+ experimental: false,
10
+ figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Composants?node-id=1002-548',
11
+ description: 'Boutons de type Pressable (React Native) avec différentes tailles et variants.',
12
+ component: Button,
13
+ styleFn: useStyles,
14
+ };
15
+ export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "secondary", size: "sm", title: "Bouton sm" }), _jsx(Button, { variant: "secondary", size: "md", title: "Bouton md" }), _jsx(Button, { variant: "secondary", size: "lg", title: "Bouton lg" })] }));
16
+ export const Primary = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "primary", title: "Bouton primary" }), _jsx(Button, { variant: "primary", title: "Disabled", disabled: true })] }));
17
+ export const Secondary = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "secondary", title: "Bouton secondary" }), _jsx(Button, { variant: "secondary", title: "Disabled", disabled: true })] }));
18
+ export const Tertiary = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "tertiary", title: "Bouton tertiary" }), _jsx(Button, { variant: "tertiary", title: "Disabled", disabled: true })] }));
19
+ export const Link = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "link", title: "Bouton link" }), _jsx(Button, { variant: "link", title: "Disabled", disabled: true })] }));
20
+ export const Icons = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, children: [_jsx(Button, { variant: "primary", title: "Start Icon", startIcon: "Plus" }), _jsx(Button, { variant: "primary", title: "End Icon", endIcon: "Plus" }), _jsx(Button, { variant: "primary", title: "End Icon", endIcon: "Plus" }), _jsx(ButtonIcon, { variant: "primary", icon: "CircleUser" }), _jsx(ButtonIcon, { variant: "primary", icon: "CircleUser" })] }));
@@ -0,0 +1,222 @@
1
+ export declare const useStyles: () => {
2
+ container: {
3
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
4
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
5
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
6
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
7
+ display: "flex";
8
+ flexDirection: "row";
9
+ justifyContent: "center";
10
+ alignItems: "center";
11
+ gap: import("@alveole/theme").Spacing;
12
+ marginTop: string;
13
+ marginBottom: string;
14
+ };
15
+ buttonLoader: {
16
+ position: "absolute";
17
+ right: import("@alveole/theme").Spacing;
18
+ };
19
+ title: {
20
+ cursor: "pointer";
21
+ minWidth: import("@alveole/theme").Spacing;
22
+ textAlign: "center";
23
+ };
24
+ primaryTitle: {
25
+ color: "#F2F9FF";
26
+ };
27
+ primaryContainer: {
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
+ };
43
+ primaryTitleHover: {
44
+ color: "#F2F9FF";
45
+ };
46
+ primaryContainerHover: {
47
+ backgroundColor: "#0048AC";
48
+ };
49
+ secondaryTitle: {
50
+ color: "#151617";
51
+ };
52
+ secondaryContainer: {
53
+ borderWidth: number;
54
+ borderColor: "#DEE3EC";
55
+ backgroundColor: "#FFFFFF";
56
+ };
57
+ secondaryTitleHover: {
58
+ color: "#151617";
59
+ };
60
+ secondaryContainerHover: {
61
+ borderColor: "#DEE3EC";
62
+ backgroundColor: "rgba(0, 0, 0, 0.04)";
63
+ };
64
+ tertiaryTitle: {
65
+ color: "#151617";
66
+ };
67
+ tertiaryContainer: {};
68
+ tertiaryTitleHover: {
69
+ color: "#151617";
70
+ };
71
+ tertiaryContainerHover: {
72
+ backgroundColor: "rgba(0, 0, 0, 0.04)";
73
+ };
74
+ linkTitle: {
75
+ color: "#076D8A";
76
+ };
77
+ linkContainer: {
78
+ backgroundColor: "transparent";
79
+ };
80
+ linkTitleHover: {
81
+ color: "#076D8A";
82
+ };
83
+ linkContainerHover: {
84
+ backgroundColor: "transparent";
85
+ };
86
+ xsContainer: {
87
+ paddingLeft: import("@alveole/theme").Spacing;
88
+ paddingRight: import("@alveole/theme").Spacing;
89
+ paddingTop: import("@alveole/theme").Spacing;
90
+ paddingBottom: import("@alveole/theme").Spacing;
91
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
92
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
93
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
94
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
95
+ };
96
+ smContainer: {
97
+ paddingLeft: import("@alveole/theme").Spacing;
98
+ paddingRight: import("@alveole/theme").Spacing;
99
+ paddingTop: import("@alveole/theme").Spacing;
100
+ paddingBottom: import("@alveole/theme").Spacing;
101
+ borderTopLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
102
+ borderBottomLeftRadius: import("@alveole/theme/dist/constants/Radius").Radius;
103
+ borderTopRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
104
+ borderBottomRightRadius: import("@alveole/theme/dist/constants/Radius").Radius;
105
+ };
106
+ mdContainer: {
107
+ paddingLeft: import("@alveole/theme").Spacing;
108
+ paddingRight: import("@alveole/theme").Spacing;
109
+ paddingTop: number;
110
+ paddingBottom: number;
111
+ };
112
+ lgContainer: {
113
+ paddingLeft: import("@alveole/theme").Spacing;
114
+ paddingRight: import("@alveole/theme").Spacing;
115
+ paddingTop: import("@alveole/theme").Spacing;
116
+ paddingBottom: import("@alveole/theme").Spacing;
117
+ };
118
+ smContainerIconOnly: {
119
+ padding: import("@alveole/theme").Spacing;
120
+ };
121
+ mdContainerIconOnly: {
122
+ padding: import("@alveole/theme").Spacing;
123
+ };
124
+ lgContainerIconOnly: {
125
+ padding: import("@alveole/theme").Spacing;
126
+ };
127
+ xsTitle: {
128
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
129
+ readonly fontSize: 12;
130
+ readonly lineHeight: 20;
131
+ readonly letterSpacing: 0;
132
+ };
133
+ smTitle: {
134
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
135
+ readonly fontSize: 14;
136
+ readonly lineHeight: 20;
137
+ readonly letterSpacing: 0;
138
+ };
139
+ mdTitle: {
140
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
141
+ readonly fontSize: 14;
142
+ readonly lineHeight: 20;
143
+ readonly letterSpacing: 0;
144
+ };
145
+ lgTitle: {
146
+ readonly fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
147
+ readonly fontSize: 16;
148
+ readonly lineHeight: 24;
149
+ readonly letterSpacing: 0;
150
+ };
151
+ smContainerStartIcon: {
152
+ paddingLeft: import("@alveole/theme").Spacing;
153
+ };
154
+ mdContainerStartIcon: {
155
+ paddingLeft: import("@alveole/theme").Spacing;
156
+ };
157
+ lgContainerStartIcon: {
158
+ paddingLeft: import("@alveole/theme").Spacing;
159
+ };
160
+ smContainerEndIcon: {
161
+ paddingRight: import("@alveole/theme").Spacing;
162
+ };
163
+ mdContainerEndIcon: {
164
+ paddingRight: import("@alveole/theme").Spacing;
165
+ };
166
+ lgContainerEndIcon: {
167
+ paddingRight: import("@alveole/theme").Spacing;
168
+ };
169
+ primaryTitleDisabled: {
170
+ cursor: "not-allowed";
171
+ color: "#8D97AC";
172
+ };
173
+ primaryContainerDisabled: {
174
+ cursor: "not-allowed";
175
+ backgroundColor: "#E6EAF1";
176
+ };
177
+ secondaryTitleDisabled: {
178
+ cursor: "not-allowed";
179
+ color: "#8D97AC";
180
+ };
181
+ secondaryContainerDisabled: {
182
+ cursor: "not-allowed";
183
+ };
184
+ tertiaryTitleDisabled: {
185
+ cursor: "not-allowed";
186
+ color: "#8D97AC";
187
+ };
188
+ tertiaryContainerDisabled: {
189
+ cursor: "not-allowed";
190
+ };
191
+ primaryIcon: {
192
+ color: "#F2F9FF";
193
+ };
194
+ primaryIconHover: {
195
+ color: "#F2F9FF";
196
+ };
197
+ primaryIconDisabled: {
198
+ color: "#8D97AC";
199
+ };
200
+ secondaryIcon: {
201
+ color: "#151617";
202
+ };
203
+ secondaryIconHover: {
204
+ color: "#151617";
205
+ };
206
+ secondaryIconDisabled: {
207
+ color: "#8D97AC";
208
+ };
209
+ tertiaryIcon: {
210
+ color: "#151617";
211
+ };
212
+ tertiaryIconHover: {
213
+ color: "#151617";
214
+ };
215
+ tertiaryIconDisabled: {
216
+ color: "#8D97AC";
217
+ };
218
+ linkIcon: {
219
+ color: "#076D8A";
220
+ };
221
+ };
222
+ //# sourceMappingURL=Button.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0MnB,CAAC"}