cozy-ui 113.0.0 → 113.1.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [113.1.0](https://github.com/cozy/cozy-ui/compare/v113.0.0...v113.1.0) (2024-11-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ShortcutTile:** Use relative import ([df81357](https://github.com/cozy/cozy-ui/commit/df81357))
7
+
8
+
9
+ ### Features
10
+
11
+ * **Typography:** Add types ([94c9ae6](https://github.com/cozy/cozy-ui/commit/94c9ae6))
12
+
1
13
  # [113.0.0](https://github.com/cozy/cozy-ui/compare/v112.3.0...v113.0.0) (2024-11-06)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "113.0.0",
3
+ "version": "113.1.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,13 +1,11 @@
1
1
  import React from 'react'
2
2
 
3
3
  import { IOCozyFile } from 'cozy-client/types/types'
4
- // @ts-expect-error - The following component is not typed
5
- import { nameToColor } from 'cozy-ui/react/Avatar/helpers'
6
- // @ts-expect-error - The following component is not typed
7
- import Typography from 'cozy-ui/react/Typography'
8
4
 
9
5
  import styles from '../AppTile/styles.styl'
6
+ import { nameToColor } from '../Avatar/helpers'
10
7
  import { TileIcon } from '../Tile'
8
+ import Typography from '../Typography'
11
9
  import { makeStyles } from '../styles'
12
10
 
13
11
  interface ShortcutTileProps {
@@ -1,6 +1,16 @@
1
1
  import MuiTypography from '@material-ui/core/Typography'
2
2
  import React, { forwardRef } from 'react'
3
3
 
4
+ /**
5
+ * @typedef TypographyPropTypes
6
+ * @property {string} [color] - The color of the text.
7
+ * @property {string} [variant] - The variant of the text.
8
+ * @property {React.ReactNode} children - The content of the component.
9
+ */
10
+
11
+ /**
12
+ * @type React.ForwardRefRenderFunction<HTMLDivElement, TypographyPropTypes & MuiTypography>
13
+ */
4
14
  const Typography = forwardRef(({ color, variant, children, ...props }, ref) => {
5
15
  const madeColor =
6
16
  color || (variant === 'caption' ? 'textSecondary' : 'textPrimary')
@@ -0,0 +1 @@
1
+ export function nameToColor(name?: string): string;
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
- // @ts-expect-error - The following component is not typed
3
- import { nameToColor } from 'cozy-ui/react/Avatar/helpers'; // @ts-expect-error - The following component is not typed
4
-
5
- import Typography from 'cozy-ui/react/Typography';
6
2
  var styles = {
7
3
  "AppTile-icon": "styles__AppTile-icon___1f0c0",
8
4
  "AppTile-icon--default": "styles__AppTile-icon--default___1tjiF",
9
5
  "AppTile-icon-maintenance": "styles__AppTile-icon-maintenance___2VOvO",
10
6
  "AppTile-container-maintenance": "styles__AppTile-container-maintenance___u1a1M"
11
7
  };
8
+ import { nameToColor } from "cozy-ui/transpiled/react/Avatar/helpers";
12
9
  import { TileIcon } from "cozy-ui/transpiled/react/Tile";
10
+ import Typography from "cozy-ui/transpiled/react/Typography";
13
11
  import { makeStyles } from "cozy-ui/transpiled/react/styles";
14
12
  var useStyles = makeStyles({
15
13
  letter: {
@@ -1,3 +1,26 @@
1
1
  export default Typography;
2
- declare const Typography: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ export type TypographyPropTypes = {
3
+ /**
4
+ * - The color of the text.
5
+ */
6
+ color?: string | undefined;
7
+ /**
8
+ * - The variant of the text.
9
+ */
10
+ variant?: string | undefined;
11
+ /**
12
+ * - The content of the component.
13
+ */
14
+ children: React.ReactNode;
15
+ };
16
+ /**
17
+ * @typedef TypographyPropTypes
18
+ * @property {string} [color] - The color of the text.
19
+ * @property {string} [variant] - The variant of the text.
20
+ * @property {React.ReactNode} children - The content of the component.
21
+ */
22
+ /**
23
+ * @type React.ForwardRefRenderFunction<HTMLDivElement, TypographyPropTypes & MuiTypography>
24
+ */
25
+ declare const Typography: React.ForwardRefRenderFunction<HTMLDivElement, TypographyPropTypes & import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core/Typography").TypographyTypeMap<{}, "span">>>;
3
26
  import React from "react";
@@ -3,6 +3,17 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["color", "variant", "children"];
4
4
  import MuiTypography from '@material-ui/core/Typography';
5
5
  import React, { forwardRef } from 'react';
6
+ /**
7
+ * @typedef TypographyPropTypes
8
+ * @property {string} [color] - The color of the text.
9
+ * @property {string} [variant] - The variant of the text.
10
+ * @property {React.ReactNode} children - The content of the component.
11
+ */
12
+
13
+ /**
14
+ * @type React.ForwardRefRenderFunction<HTMLDivElement, TypographyPropTypes & MuiTypography>
15
+ */
16
+
6
17
  var Typography = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
18
  var color = _ref.color,
8
19
  variant = _ref.variant,
@@ -0,0 +1,46 @@
1
+ export const black: string;
2
+ export const white: string;
3
+ export const paleGrey: string;
4
+ export const silver: string;
5
+ export const coolGrey: string;
6
+ export const slateGrey: string;
7
+ export const charcoalGrey: string;
8
+ export const overlay: string;
9
+ export const primaryColor: string;
10
+ export const primaryColorLight: string;
11
+ export const primaryContrastTextColor: string;
12
+ export const success: string;
13
+ export const warning: string;
14
+ export const error: string;
15
+ export const info: string;
16
+ export const errorBackground: string;
17
+ export const primaryBackgroundLight: string;
18
+ export const neutralBackground: string;
19
+ export const zircon: string;
20
+ export const frenchPass: string;
21
+ export const dodgerBlue: string;
22
+ export const scienceBlue: string;
23
+ export const puertoRico: string;
24
+ export const grannyApple: string;
25
+ export const emerald: string;
26
+ export const malachite: string;
27
+ export const seafoamGreen: string;
28
+ export const brightSun: string;
29
+ export const texasRose: string;
30
+ export const chablis: string;
31
+ export const yourPink: string;
32
+ export const fuchsia: string;
33
+ export const pomegranate: string;
34
+ export const monza: string;
35
+ export const portage: string;
36
+ export const azure: string;
37
+ export const melon: string;
38
+ export const blazeOrange: string;
39
+ export const mango: string;
40
+ export const pumpkinOrange: string;
41
+ export const lavender: string;
42
+ export const darkPeriwinkle: string;
43
+ export const purpley: string;
44
+ export const lightishPurple: string;
45
+ export const barney: string;
46
+ export const weirdGreen: string;