@alveole/components 0.38.2 → 0.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/ui/Button/Button.d.ts.map +1 -1
- package/dist/ui/Button/Button.js +2 -3
- package/dist/ui/Button/Button.stories.d.ts +0 -2
- package/dist/ui/Button/Button.stories.d.ts.map +1 -1
- package/dist/ui/Button/Button.stories.js +2 -2
- package/dist/ui/Button/Button.stories.sources.d.ts.map +1 -1
- package/dist/ui/Button/Button.stories.sources.js +2 -2
- package/dist/ui/Button/Button.styles.d.ts +0 -2
- package/dist/ui/Button/Button.styles.d.ts.map +1 -1
- package/dist/ui/Button/Button.styles.js +0 -2
- package/dist/ui/Button/ButtonIcon.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "0.38.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "0.38.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "0.38.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "0.38.4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAgC,cAAc,EAA8B,IAAI,EAAE,MAAM,cAAc,CAAC;AAC9G,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AAOtD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACrE,KAAK,EAAE,MAAM,CA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,CAAC;AAOtD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClE,SAAS,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM;WAhBV,MAAM;WACN,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;aACvB,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM;gBACrD,SAAS,CAAC,MAAM,CAAC;cACnB,SAAS,CAAC,MAAM,CAAC;eAChB,OAAO;qBACD,QAAQ;gBACb,OAAO;gBACP,OAAO;iBACN,OAAO;gBACR,OAAO;WACZ,QAAQ,GAAG,QAAQ;aACjB,OAAO;gBACJ,OAAO;8BA4OnB,CAAC"}
|
package/dist/ui/Button/Button.js
CHANGED
|
@@ -212,7 +212,7 @@ export const Button = React.forwardRef(function Button(props, ref) {
|
|
|
212
212
|
: state.hovered
|
|
213
213
|
? styles.secondaryContainerHover.borderColor
|
|
214
214
|
: styles.secondaryContainer.borderColor;
|
|
215
|
-
borderProps = { borderWidth:
|
|
215
|
+
borderProps = { borderWidth: 1, borderStyle: 'solid', borderColor };
|
|
216
216
|
}
|
|
217
217
|
else if (variant === 'danger') {
|
|
218
218
|
const borderColor = disabled
|
|
@@ -220,12 +220,11 @@ export const Button = React.forwardRef(function Button(props, ref) {
|
|
|
220
220
|
: state.hovered
|
|
221
221
|
? styles.dangerContainerHover.borderColor
|
|
222
222
|
: styles.dangerContainer.borderColor;
|
|
223
|
-
borderProps = { borderWidth:
|
|
223
|
+
borderProps = { borderWidth: 1, borderStyle: 'solid', borderColor };
|
|
224
224
|
}
|
|
225
225
|
return {
|
|
226
226
|
...radiusStyle,
|
|
227
227
|
...borderProps,
|
|
228
|
-
alignSelf: fullWidth ? 'auto' : 'flex-start',
|
|
229
228
|
...(fullWidth ? { width: '100%' } : {}),
|
|
230
229
|
};
|
|
231
230
|
};
|
|
@@ -31,8 +31,6 @@ declare const _default: {
|
|
|
31
31
|
justifyContent: "center";
|
|
32
32
|
alignItems: "center";
|
|
33
33
|
gap: import("@alveole/theme").Spacing;
|
|
34
|
-
marginTop: string;
|
|
35
|
-
marginBottom: string;
|
|
36
34
|
transitionProperty: "all";
|
|
37
35
|
transitionDuration: "150ms";
|
|
38
36
|
transitionTimingFunction: "ease";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,mCAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,mCAKpB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAKlB,CAAC;AAEF,eAAO,MAAM,IAAI,mCAShB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAQjB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAAkE,CAAC;AAEzF,eAAO,MAAM,QAAQ,mCAIpB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAOlB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC"}
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
component: Button,
|
|
13
13
|
styleFn: useStyles,
|
|
14
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" })] }));
|
|
15
|
+
export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", "align-items": "flex-start", 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
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
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
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 })] }));
|
|
@@ -21,5 +21,5 @@ export const Link = () => (_jsxs(Box, { display: "flex", flexDirection: "column"
|
|
|
21
21
|
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" })] }));
|
|
22
22
|
export const FullWidth = () => _jsx(Button, { variant: "primary", title: "Full Width", fullWidth: true });
|
|
23
23
|
export const Selected = () => (_jsx(Box, { display: "flex", flexDirection: "row", gap: 4, children: _jsx(Button, { variant: "secondary", title: "Selected", selected: true }) }));
|
|
24
|
-
export const Active = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsx(Typography, { children: "Utilis\u00E9 quand le bouton est actif (ex: quand un menu est ouvert)" }), _jsx(Box, { children: _jsx(Button, { variant: "secondary", title: "Active", active: true }) })] }));
|
|
24
|
+
export const Active = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsx(Typography, { children: "Utilis\u00E9 quand le bouton est actif (ex: quand un menu est ouvert)" }), _jsx(Box, { display: "flex", children: _jsx(Button, { variant: "secondary", title: "Active", active: true }) })] }));
|
|
25
25
|
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,KAAK,
|
|
1
|
+
{"version":3,"file":"Button.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,cAA0V,CAAC;AAE7W,eAAO,MAAM,OAAO,cAA4O,CAAC;AAEjQ,eAAO,MAAM,SAAS,cAAoP,CAAC;AAE3Q,eAAO,MAAM,QAAQ,cAAgP,CAAC;AAEtQ,eAAO,MAAM,MAAM,cAAwO,CAAC;AAE5P,eAAO,MAAM,IAAI,cAAua,CAAC;AAEzb,eAAO,MAAM,KAAK,cAAic,CAAC;AAEpd,eAAO,MAAM,SAAS,cAAwG,CAAC;AAE/H,eAAO,MAAM,QAAQ,cAAkL,CAAC;AAExM,eAAO,MAAM,MAAM,cAAwT,CAAC;AAE5U,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,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/ui/Button/Button.stories.tsx
|
|
3
|
-
export const Sizes = () => "export const Sizes = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"secondary\" size=\"sm\" title=\"Bouton sm\" />\n <Button variant=\"secondary\" size=\"md\" title=\"Bouton md\" />\n <Button variant=\"secondary\" size=\"lg\" title=\"Bouton lg\" />\n </Box>\n);";
|
|
3
|
+
export const Sizes = () => "export const Sizes = () => (\n <Box display=\"flex\" flexDirection=\"row\" align-items=\"flex-start\" gap={4}>\n <Button variant=\"secondary\" size=\"sm\" title=\"Bouton sm\" />\n <Button variant=\"secondary\" size=\"md\" title=\"Bouton md\" />\n <Button variant=\"secondary\" size=\"lg\" title=\"Bouton lg\" />\n </Box>\n);";
|
|
4
4
|
export const Primary = () => "export const Primary = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"primary\" title=\"Bouton primary\" />\n <Button variant=\"primary\" title=\"Disabled\" disabled />\n </Box>\n);";
|
|
5
5
|
export const Secondary = () => "export const Secondary = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"secondary\" title=\"Bouton secondary\" />\n <Button variant=\"secondary\" title=\"Disabled\" disabled />\n </Box>\n);";
|
|
6
6
|
export const Tertiary = () => "export const Tertiary = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"tertiary\" title=\"Bouton tertiary\" />\n <Button variant=\"tertiary\" title=\"Disabled\" disabled />\n </Box>\n);";
|
|
@@ -9,7 +9,7 @@ export const Link = () => "export const Link = () => (\n <Box display=\"flex\"
|
|
|
9
9
|
export const Icons = () => "export const Icons = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"primary\" title=\"Start Icon\" startIcon=\"Plus\" />\n <Button variant=\"primary\" title=\"End Icon\" endIcon=\"Plus\" />\n <Button variant=\"primary\" title=\"End Icon\" endIcon=\"Plus\" />\n <ButtonIcon variant=\"primary\" icon=\"CircleUser\" />\n <ButtonIcon variant=\"primary\" icon=\"CircleUser\" />\n </Box>\n);";
|
|
10
10
|
export const FullWidth = () => "export const FullWidth = () => <Button variant=\"primary\" title=\"Full Width\" fullWidth />;";
|
|
11
11
|
export const Selected = () => "export const Selected = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4}>\n <Button variant=\"secondary\" title=\"Selected\" selected />\n </Box>\n);";
|
|
12
|
-
export const Active = () => "export const Active = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap={4}>\n <Typography>Utilisé quand le bouton est actif (ex: quand un menu est ouvert)</Typography>\n <Box>\n <Button variant=\"secondary\" title=\"Active\" active />\n </Box>\n </Box>\n);";
|
|
12
|
+
export const Active = () => "export const Active = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap={4}>\n <Typography>Utilisé quand le bouton est actif (ex: quand un menu est ouvert)</Typography>\n <Box display=\"flex\">\n <Button variant=\"secondary\" title=\"Active\" active />\n </Box>\n </Box>\n);";
|
|
13
13
|
export const storySources = {
|
|
14
14
|
Sizes,
|
|
15
15
|
Primary,
|
|
@@ -9,8 +9,6 @@ export declare const useStyles: () => {
|
|
|
9
9
|
justifyContent: "center";
|
|
10
10
|
alignItems: "center";
|
|
11
11
|
gap: import("@alveole/theme").Spacing;
|
|
12
|
-
marginTop: string;
|
|
13
|
-
marginBottom: string;
|
|
14
12
|
transitionProperty: "all";
|
|
15
13
|
transitionDuration: "150ms";
|
|
16
14
|
transitionTimingFunction: "ease";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkRnB,CAAC"}
|
|
@@ -10,8 +10,6 @@ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
|
|
|
10
10
|
justifyContent: 'center',
|
|
11
11
|
alignItems: 'center',
|
|
12
12
|
gap: spacing('050'),
|
|
13
|
-
marginTop: 'auto',
|
|
14
|
-
marginBottom: 'auto',
|
|
15
13
|
transitionProperty: 'all',
|
|
16
14
|
transitionDuration: '150ms',
|
|
17
15
|
transitionTimingFunction: 'ease',
|
|
@@ -35,7 +35,7 @@ export const ButtonIcon = (props) => {
|
|
|
35
35
|
else if (!!state.hovered)
|
|
36
36
|
applicableStyles = { ...applicableStyles, ...styles.tertiaryContainerHover };
|
|
37
37
|
}
|
|
38
|
-
return { ...applicableStyles, ...containerSize,
|
|
38
|
+
return { ...applicableStyles, ...containerSize, ...(style ?? {}) };
|
|
39
39
|
};
|
|
40
40
|
const iconStyle = (state) => {
|
|
41
41
|
if (!iconSize) {
|