@groupeactual/design-tokens 1.7.0-beta.0 → 1.7.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupeactual/design-tokens",
3
- "version": "1.7.0-beta.0",
3
+ "version": "1.7.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "A simple library to manage design tokens",
6
6
  "dependencies": {
@@ -9,36 +9,36 @@
9
9
  "react-dom": "^18.3.1"
10
10
  },
11
11
  "devDependencies": {
12
- "@babel/core": "^7.25.2",
13
- "@babel/preset-env": "^7.25.4",
14
- "@babel/preset-react": "^7.24.7",
15
- "@babel/preset-typescript": "^7.24.7",
16
- "@groupeactual/code-quality-front": "^1.2.1",
17
- "@mdx-js/react": "^3.0.1",
12
+ "@babel/core": "^7.26.0",
13
+ "@babel/preset-env": "^7.26.0",
14
+ "@babel/preset-react": "^7.25.9",
15
+ "@babel/preset-typescript": "^7.26.0",
16
+ "@groupeactual/code-quality-front": "^1.3.0",
17
+ "@mdx-js/react": "^3.1.0",
18
18
  "@rollup/plugin-alias": "^5.1.1",
19
- "@rollup/plugin-commonjs": "^26.0.1",
19
+ "@rollup/plugin-commonjs": "^28.0.1",
20
20
  "@rollup/plugin-json": "^6.1.0",
21
- "@rollup/plugin-node-resolve": "^15.2.3",
22
- "@rollup/plugin-typescript": "^11.1.6",
23
- "@types/react": "^18.3.4",
24
- "@typescript-eslint/eslint-plugin": "^8.3.0",
25
- "@typescript-eslint/parser": "^8.3.0",
26
- "babel-loader": "^9.1.3",
21
+ "@rollup/plugin-node-resolve": "^15.3.0",
22
+ "@rollup/plugin-typescript": "^12.1.1",
23
+ "@types/react": "^18.3.12",
24
+ "@typescript-eslint/eslint-plugin": "^8.15.0",
25
+ "@typescript-eslint/parser": "^8.15.0",
26
+ "babel-loader": "^9.2.1",
27
27
  "clsx": "^2.1.1",
28
28
  "css-loader": "^7.1.2",
29
29
  "identity-obj-proxy": "^3.0.0",
30
- "postcss": "^8.4.41",
30
+ "postcss": "^8.4.49",
31
31
  "prettier": "^3.3.3",
32
- "rollup": "^4.21.1",
32
+ "rollup": "^4.27.3",
33
33
  "rollup-plugin-dts": "^6.1.1",
34
34
  "rollup-plugin-postcss": "^4.0.2",
35
- "sass": "^1.77.8",
36
- "sass-loader": "^16.0.1",
37
- "style-dictionary": "^4.1.0",
35
+ "sass": "^1.81.0",
36
+ "sass-loader": "^16.0.3",
37
+ "style-dictionary": "^4.2.0",
38
38
  "style-loader": "^4.0.0",
39
39
  "token-transformer": "^0.0.33",
40
- "tslib": "^2.7.0",
41
- "typescript": "^5.5.4"
40
+ "tslib": "^2.8.1",
41
+ "typescript": "^5.6.3"
42
42
  },
43
43
  "main": "dist/cjs/index.js",
44
44
  "module": "dist/es/index.js",
@@ -51,7 +51,7 @@
51
51
  "build": "rollup -c",
52
52
  "build:watch": "rollup --bundleConfigAsCjs -c -w",
53
53
  "dev": "npm run build:watch",
54
- "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
54
+ "eslint": "eslint --config \"eslint.config.js\" --color \".\"",
55
55
  "lint": "npm run eslint"
56
56
  }
57
57
  }
@@ -15,13 +15,22 @@ const ButtonCss = (muiTokens: MuiTokens): Record<string, unknown> => {
15
15
  height: '44px',
16
16
  border: '1px solid',
17
17
  borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
18
+ '.MuiSvgIcon-root': {
19
+ paddingBottom: '2px',
20
+ },
18
21
  },
19
22
  '&.MuiButton-primary': {
23
+ '.MuiTypography-buttonNotif': {
24
+ color: muiTokens.palette.white + ' !important',
25
+ },
20
26
  color: muiTokens.palette.white + ' !important',
21
27
  backgroundColor: muiTokens.palette.blueClickable + ' !important',
22
28
  border: '1px solid' + ' !important',
23
29
  borderColor: muiTokens.palette.blueClickable + ' !important',
24
30
  '&.Mui-disabled': {
31
+ '.MuiTypography-buttonNotif': {
32
+ color: muiTokens.palette.white + ' !important',
33
+ },
25
34
  backgroundColor: muiTokens.palette.greyMediumInactive + ' !important',
26
35
  borderColor: muiTokens.palette.greyMediumInactive + ' !important',
27
36
  color: muiTokens.palette.white + ' !important',
@@ -32,6 +41,9 @@ const ButtonCss = (muiTokens: MuiTokens): Record<string, unknown> => {
32
41
  },
33
42
  },
34
43
  '&.MuiButton-secondary': {
44
+ '.MuiTypography-buttonNotif': {
45
+ color: muiTokens.palette.blueClickable + ' !important',
46
+ },
35
47
  color: muiTokens.palette.blueClickable,
36
48
  backgroundColor: muiTokens.palette.white + ' !important',
37
49
  border: '1px solid',
@@ -40,6 +52,9 @@ const ButtonCss = (muiTokens: MuiTokens): Record<string, unknown> => {
40
52
  color: muiTokens.palette.blueClickable,
41
53
  },
42
54
  '&.Mui-disabled': {
55
+ '.MuiTypography-buttonNotif': {
56
+ color: muiTokens.palette.greyMediumInactive + ' !important',
57
+ },
43
58
  backgroundColor: muiTokens.palette.white,
44
59
  borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
45
60
  color: muiTokens.palette.greyMediumInactive + ' !important',
@@ -6,6 +6,9 @@ const DatatableCss = (muiTokens: MuiTokens): Record<string, unknown> => {
6
6
  backgroundColor: muiTokens.palette.white,
7
7
  borderRadius: '4px',
8
8
  },
9
+ '.MuiTableCell-root': {
10
+ borderColor: muiTokens.palette.greyLightDefaultBorder,
11
+ },
9
12
  '& .MuiTableRow-root': {
10
13
  height: '50px',
11
14
  borderColor: muiTokens.palette.greyLightDefaultBorder,
@@ -9,6 +9,7 @@ const AutoCompleteCss = (muiTokens: MuiTokens): Record<string, unknown> => {
9
9
  height: '44px',
10
10
  padding: 0 + ' !important',
11
11
  '.SelectIcon': {
12
+ marginTop: '-1px',
12
13
  color: muiTokens.palette.blueClickable + ' !important',
13
14
  },
14
15
  },
@@ -110,6 +110,10 @@ const CheckboxCss = (muiTokens: MuiTokens): Record<string, unknown> => {
110
110
  borderRadius: '0px',
111
111
  },
112
112
  },
113
+ '.MuiBox-root .MuiBox-root svg': {
114
+ top: '1px',
115
+ position: 'relative',
116
+ },
113
117
  },
114
118
  '.MuiFormHelperText-root': {
115
119
  marginTop: '3px',
@@ -36,14 +36,6 @@ const CheckboxGroupCss = (muiTokens: MuiTokens): Record<string, unknown> => {
36
36
  color: muiTokens.palette.redError + ' !important',
37
37
  },
38
38
  },
39
- // à garder pour label.css qui sera un fichier à faire peut être plus tard ⬆️
40
- // l'idée c'est d'avoir un label.css qui reprend ce css pour tous nos composants à label
41
- // et donc éviter d'avoir à le réécrire à chaque fois
42
- '.MuiBox-root .MuiBox-root svg': {
43
- // fix du tooltip uniquement pour checkboxGroup
44
- position: 'relative',
45
- bottom: '-2px',
46
- },
47
39
  };
48
40
  };
49
41
 
@@ -35,6 +35,9 @@ const DatePickerCss = (muiTokens: MuiTokens): Record<string, unknown> => {
35
35
  },
36
36
  },
37
37
  '.Mui-disabled': {
38
+ '&.MuiButtonBase-root': {
39
+ color: muiTokens.palette.greyMediumInactive,
40
+ },
38
41
  '.MuiOutlinedInput-notchedOutline': {
39
42
  borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
40
43
  },
@@ -48,7 +51,7 @@ const DatePickerCss = (muiTokens: MuiTokens): Record<string, unknown> => {
48
51
  borderColor: muiTokens.palette.greenSuccess + ' !important',
49
52
  },
50
53
  '.MuiInputAdornment-root': {
51
- '.MuiSvgIcon-root': {
54
+ '.itemIcon .MuiSvgIcon-root': {
52
55
  color: muiTokens.palette.greenSuccess,
53
56
  },
54
57
  },
@@ -3,16 +3,12 @@ import { MuiTokens } from '@/interfaces/theme';
3
3
  const RadioCss = (muiTokens: MuiTokens): Record<string, unknown> => {
4
4
  return {
5
5
  '&.MuiFormControl-root': {
6
- '.MuiSvgIcon-root': {
7
- marginTop: '-2px',
8
- },
9
6
  '.MuiRadio-root': {
10
7
  '.MuiSvgIcon-root': {
11
8
  flexShrink: 0,
12
9
  zIndex: 1,
13
10
  height: '16px',
14
11
  width: '16px',
15
- marginTop: '-2px',
16
12
  color: muiTokens.palette.greyMediumInactive,
17
13
  },
18
14
  height: '16px',
@@ -24,6 +20,10 @@ const RadioCss = (muiTokens: MuiTokens): Record<string, unknown> => {
24
20
  },
25
21
  },
26
22
  },
23
+ '.MuiBox-root .itemIcon svg': {
24
+ top: '1px',
25
+ position: 'relative',
26
+ },
27
27
  '.MuiFormControlLabel-root': {
28
28
  margin: '0px 0px 4px 0px',
29
29
  color: muiTokens.palette.greyXDark,
@@ -60,6 +60,9 @@ const RadioCss = (muiTokens: MuiTokens): Record<string, unknown> => {
60
60
  '.MuiFormLabel-root': {
61
61
  color: muiTokens.palette.greyDark,
62
62
  },
63
+ '.MuiTypography-root': {
64
+ color: muiTokens.palette.greyDark,
65
+ },
63
66
  '.MuiFormControlLabel-label': {
64
67
  color: muiTokens.palette.greyDark,
65
68
  },
@@ -87,9 +90,8 @@ const RadioCss = (muiTokens: MuiTokens): Record<string, unknown> => {
87
90
  },
88
91
  '.MuiTouchRipple-root': {
89
92
  background: 'white',
90
- height: '12px',
91
- width: '12px',
92
- top: '3px',
93
+ height: '16px',
94
+ width: '16px',
93
95
  zIndex: 0,
94
96
  left: '3px',
95
97
  },
@@ -23,6 +23,7 @@ const SelectCss = (muiTokens: MuiTokens): Record<string, unknown> => {
23
23
  padding: 0 + ' !important',
24
24
  backgroundColor: muiTokens.palette.white,
25
25
  '.SelectIcon': {
26
+ marginTop: '-2px',
26
27
  color: muiTokens.palette.blueClickable + ' !important',
27
28
  },
28
29
  },
@@ -81,7 +82,7 @@ const SelectCss = (muiTokens: MuiTokens): Record<string, unknown> => {
81
82
  visibility: 'hidden',
82
83
  alignSelf: 'center',
83
84
  position: 'relative',
84
- marginTop: '2px',
85
+ marginTop: '3px',
85
86
  marginRight: '-8px',
86
87
  },
87
88
 
@@ -89,7 +90,7 @@ const SelectCss = (muiTokens: MuiTokens): Record<string, unknown> => {
89
90
  fontWeight: 400,
90
91
  lineHeight: '18px',
91
92
  fontSize: '14px',
92
- color: '#545352 !important',
93
+ color: muiTokens.palette.greyDark + ' !important',
93
94
  },
94
95
  '&.Select-mui': {
95
96
  '&.Mui-filled': {
@@ -135,7 +136,7 @@ const SelectCss = (muiTokens: MuiTokens): Record<string, unknown> => {
135
136
  fontSize: '14px',
136
137
  lineHeight: '18px',
137
138
  fontWeight: 400,
138
- padding: '8px 31px 10px 14px',
139
+ padding: '13px 2px 11px 8px',
139
140
  '&.Mui-disabled': {
140
141
  color: muiTokens.palette.greyDark,
141
142
  WebkitTextFillColor: muiTokens.palette.greyDark,
@@ -13,8 +13,13 @@ const TextFieldCss = (muiTokens: MuiTokens): Record<string, unknown> => {
13
13
  '.Mui-error .MuiOutlinedInput-notchedOutline': {
14
14
  borderColor: muiTokens.palette.redError + ' !important',
15
15
  },
16
- '.Mui-disabled .MuiOutlinedInput-notchedOutline': {
17
- borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
16
+ '.Mui-disabled': {
17
+ '.MuiSvgIcon-root': {
18
+ color: muiTokens.palette.greyMediumInactive,
19
+ },
20
+ '.MuiOutlinedInput-notchedOutline': {
21
+ borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
22
+ },
18
23
  },
19
24
  '&.MuiTextField-root': {
20
25
  '.MuiInputBase-root': {
@@ -121,6 +126,12 @@ const TextFieldCss = (muiTokens: MuiTokens): Record<string, unknown> => {
121
126
  color: muiTokens.palette.redError,
122
127
  },
123
128
  },
129
+ '.MuiInputBase-root.Mui-disabled': {
130
+ backgroundColor: muiTokens.palette.greyXLight,
131
+ },
132
+ 'textarea.MuiOutlinedInput-input': {
133
+ paddingBottom: '1px !important',
134
+ },
124
135
  '.MuiOutlinedInput-input': {
125
136
  fontSize: '14px',
126
137
  lineHeight: '18px',
@@ -7,10 +7,7 @@ const IconButtonCss = (muiTokens: MuiTokens): Record<string, unknown> => {
7
7
  '& .MuiTouchRipple-root .MuiTouchRipple-child': {
8
8
  borderRadius: '4px',
9
9
  },
10
- '& .MuiSvgIcon-root': {
11
- color: muiTokens.palette.blueClickable,
12
- },
13
- '&:hover': {
10
+ ':hover': {
14
11
  '& .MuiSvgIcon-root': {
15
12
  color: muiTokens.palette.blueHoverClickable,
16
13
  },
@@ -2,8 +2,21 @@ import { MuiTokens } from '@/interfaces/theme';
2
2
 
3
3
  const MenuItemCss = (muiTokens: MuiTokens): Record<string, unknown> => {
4
4
  return {
5
- padding: '16px 14px',
5
+ padding: '13px 16px',
6
+ '.itemIcon': {
7
+ color: muiTokens.palette.greyDark,
8
+ },
9
+ '.MuiTypography-root': {
10
+ paddingTop: '2px',
11
+ },
6
12
  '&:hover': {
13
+ '.MuiTypography-root': {
14
+ fontWeight: 500,
15
+ paddingTop: '2px',
16
+ },
17
+ '.itemIcon': {
18
+ color: muiTokens.palette.blueHoverClickable,
19
+ },
7
20
  backgroundColor: muiTokens.palette.blueHoverOpacity12,
8
21
  '& .MuiTypography-body2': {
9
22
  color: muiTokens.palette.blueHoverClickable,
@@ -3,6 +3,7 @@ import { MuiTokens } from '@/interfaces/theme';
3
3
  const PaginationCss = (muiTokens: MuiTokens): Record<string, unknown> => {
4
4
  return {
5
5
  '.MuiPaginationItem-root': {
6
+ fontFamily: 'Roboto',
6
7
  height: '44px !important',
7
8
  width: '44px !important',
8
9
  color: muiTokens.palette.blueClickable + ' !important',
@@ -11,6 +12,26 @@ const PaginationCss = (muiTokens: MuiTokens): Record<string, unknown> => {
11
12
  outline: 'none !important',
12
13
  fontSize: '14px !important',
13
14
  borderColor: muiTokens.palette.greyLightDefaultBorder + ' !important',
15
+ '&.Mui-selected': {
16
+ color: 'white !important',
17
+ backgroundColor: muiTokens.palette.blueClickable + ' !important',
18
+ borderRadius: '4px !important',
19
+ outline: 'none !important',
20
+ '&:hover': {
21
+ color: 'white !important',
22
+ backgroundColor: muiTokens.palette.blueClickable + ' !important',
23
+ borderColor: muiTokens.palette.greyDark + ' !important',
24
+ borderRadius: '4px !important',
25
+ outline: 'none !important',
26
+ },
27
+ '&:focus': {
28
+ color: 'white !important',
29
+ backgroundColor: muiTokens.palette.blueClickable + ' !important',
30
+ borderColor: muiTokens.palette.greyDark + ' !important',
31
+ borderRadius: '4px !important',
32
+ outline: 'none !important',
33
+ },
34
+ },
14
35
  '&:hover': {
15
36
  color: muiTokens.palette.blueClickable + ' !important',
16
37
  backgroundColor: 'white !important',
@@ -1,22 +1,5 @@
1
1
  const TooltipCss = (): Record<string, unknown> => {
2
- return {
3
- '& .MuiTooltip-tooltip': {
4
- background: 'red',
5
- backgroundColor: 'red',
6
- },
7
- '.MuiTooltip-tooltip': {
8
- background: 'red',
9
- backgroundColor: 'red',
10
- },
11
- '& .MuiPopper-popper': {
12
- background: 'red',
13
- backgroundColor: 'red',
14
- },
15
- '.MuiPopper-popper': {
16
- background: 'red',
17
- backgroundColor: 'red',
18
- },
19
- };
2
+ return {};
20
3
  };
21
4
 
22
5
  export default TooltipCss;