@groupeactual/ui-kit 0.4.25 → 0.4.26
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/cjs/DesignSystemProvider.d.ts +2 -2
- package/dist/cjs/components/Button/Button.d.ts +4 -4
- package/dist/cjs/components/EmbbededNotification/EmbeddedNotification.d.ts +2 -2
- package/dist/cjs/components/Form/MultiSelect/MultiSelect.d.ts +14 -0
- package/dist/cjs/components/Form/MultiSelect/index.d.ts +1 -0
- package/dist/cjs/components/Form/Select/Select.d.ts +14 -0
- package/dist/cjs/components/Form/Select/index.d.ts +1 -0
- package/dist/cjs/components/Form/TextField/TextField.d.ts +1 -2
- package/dist/cjs/components/Icon/Icon.d.ts +2 -2
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/cjs/components/Tooltip/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/index.js +5092 -1248
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/DesignSystemProvider.d.ts +2 -2
- package/dist/esm/components/Button/Button.d.ts +4 -4
- package/dist/esm/components/EmbbededNotification/EmbeddedNotification.d.ts +2 -2
- package/dist/esm/components/Form/MultiSelect/MultiSelect.d.ts +14 -0
- package/dist/esm/components/Form/MultiSelect/index.d.ts +1 -0
- package/dist/esm/components/Form/Select/Select.d.ts +14 -0
- package/dist/esm/components/Form/Select/index.d.ts +1 -0
- package/dist/esm/components/Form/TextField/TextField.d.ts +1 -2
- package/dist/esm/components/Icon/Icon.d.ts +2 -2
- package/dist/esm/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/esm/components/Tooltip/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/index.js +5091 -1250
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +54 -25
- package/package.json +8 -5
- package/src/DesignSystemProvider.tsx +9 -2
- package/src/components/Accordion/Accordion.tsx +6 -1
- package/src/components/Button/Button.tsx +9 -4
- package/src/components/Chip/Chip.tsx +1 -0
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +2 -2
- package/src/components/Form/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Form/MultiSelect/MultiSelect.tsx +176 -0
- package/src/components/Form/MultiSelect/index.ts +1 -0
- package/src/components/Form/Select/Select.tsx +154 -0
- package/src/components/Form/Select/index.ts +1 -0
- package/src/components/Form/TextField/TextField.tsx +13 -6
- package/src/components/Icon/Icon.tsx +14 -11
- package/src/components/Link/Link.tsx +1 -0
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/Text/Text.tsx +1 -0
- package/src/components/Tooltip/Tooltip.tsx +24 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/index.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
1
2
|
import SvgIcon from '@mui/material/SvgIcon';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
3
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
4
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
5
5
|
import Box, { BoxProps } from '@mui/material/Box';
|
|
@@ -61,7 +61,7 @@ const FontAwesomeSvgIcon = forwardRef<SVGSVGElement, FontAwesomeSvgIconProps>(
|
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
|
|
64
|
-
const
|
|
64
|
+
const IconProvider = ({
|
|
65
65
|
variant = 'none',
|
|
66
66
|
icon,
|
|
67
67
|
color = '#136cac',
|
|
@@ -84,9 +84,9 @@ const Icon = ({
|
|
|
84
84
|
borderRadius: '4px',
|
|
85
85
|
borderColor: '1px solid ' + usedColor,
|
|
86
86
|
overflow: 'visible',
|
|
87
|
-
padding:
|
|
88
|
-
width:
|
|
89
|
-
height:
|
|
87
|
+
padding: '10px',
|
|
88
|
+
width: '35px',
|
|
89
|
+
height: '35px',
|
|
90
90
|
display: 'flex',
|
|
91
91
|
justifyContent: 'center',
|
|
92
92
|
alignItems: 'center'
|
|
@@ -107,11 +107,14 @@ const Icon = ({
|
|
|
107
107
|
return key in FontSizes;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
const usedFontSize: number =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
const usedFontSize: number =
|
|
111
|
+
variant === 'square'
|
|
112
|
+
? 16
|
|
113
|
+
: isKey(size)
|
|
114
|
+
? FontSizes[size]
|
|
115
|
+
: size >= 0
|
|
116
|
+
? size
|
|
117
|
+
: 16;
|
|
115
118
|
|
|
116
119
|
return (
|
|
117
120
|
<Box component="span" sx={getStyles()} {...props}>
|
|
@@ -120,4 +123,4 @@ const Icon = ({
|
|
|
120
123
|
);
|
|
121
124
|
};
|
|
122
125
|
|
|
123
|
-
export default
|
|
126
|
+
export default IconProvider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
4
|
Divider,
|
|
@@ -60,7 +60,7 @@ const Pagination = ({
|
|
|
60
60
|
/>
|
|
61
61
|
<Select
|
|
62
62
|
sx={{
|
|
63
|
-
|
|
63
|
+
// @TODO replace by Select from ui-kit when ready
|
|
64
64
|
height: '32px',
|
|
65
65
|
width: '75px',
|
|
66
66
|
fontSize: '14px',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { IconButton, Tooltip as TooltipMui, TooltipProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
interface Props extends Omit<TooltipProps, 'icon' | 'children'> {
|
|
5
|
+
title: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Tooltip = ({ title, children, ...props }: Props) => (
|
|
10
|
+
<TooltipMui title={title} {...props} className="DsTooltip-root">
|
|
11
|
+
<IconButton
|
|
12
|
+
sx={{
|
|
13
|
+
padding: 0,
|
|
14
|
+
'& .MuiBox-root': {
|
|
15
|
+
width: 0
|
|
16
|
+
}
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</IconButton>
|
|
21
|
+
</TooltipMui>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tooltip';
|
package/src/components/index.ts
CHANGED
|
@@ -2,9 +2,12 @@ export { default as Text } from './Text';
|
|
|
2
2
|
export { default as Link } from './Link';
|
|
3
3
|
export { default as Button } from './Button';
|
|
4
4
|
export { default as TextField } from './Form/TextField';
|
|
5
|
+
export { default as Select } from './Form/Select';
|
|
6
|
+
export { default as MultiSelect } from './Form/MultiSelect';
|
|
5
7
|
export { default as Checkbox } from './Form/Checkbox';
|
|
6
8
|
export { default as Accordion } from './Accordion';
|
|
7
9
|
export { default as IconProvider } from './Icon/Icon';
|
|
8
10
|
export { default as Pagination } from './Pagination';
|
|
9
11
|
export { default as Chip } from './Chip/Chip';
|
|
10
12
|
export { default as EmbeddedNotification } from './EmbbededNotification/EmbeddedNotification';
|
|
13
|
+
export { default as Tooltip } from './Tooltip/Tooltip';
|