cozy-ui 136.2.2 → 137.0.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/react/AppTitle/Readme.md +6 -12
  4. package/react/AppTitle/index.jsx +8 -95
  5. package/react/AppTitle/styles.styl +0 -6
  6. package/react/Icon/Readme.md +1 -1
  7. package/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +3 -0
  8. package/react/Table/Virtualized/Dnd/TableRow.jsx +3 -2
  9. package/transpiled/react/AppTitle/index.d.ts +6 -14
  10. package/transpiled/react/AppTitle/index.js +12 -88
  11. package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
  12. package/transpiled/react/Icon/icons-sprite.js +1 -1
  13. package/transpiled/react/MuiCozyTheme/overrides/makeDarkInvertedOverrides.d.ts +3 -0
  14. package/transpiled/react/MuiCozyTheme/overrides/makeDarkNormalOverrides.d.ts +3 -0
  15. package/transpiled/react/MuiCozyTheme/overrides/makeLightInvertedOverrides.d.ts +3 -0
  16. package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.d.ts +3 -0
  17. package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +3 -0
  18. package/transpiled/react/Table/Virtualized/Dnd/TableRow.js +4 -2
  19. package/transpiled/react/stylesheet.css +1 -1
  20. package/assets/icons/illus/calendar-text.svg +0 -1
  21. package/assets/icons/illus/chat-text.svg +0 -1
  22. package/assets/icons/illus/contacts-text.svg +0 -1
  23. package/assets/icons/illus/drive-text.svg +0 -1
  24. package/assets/icons/illus/mail-text.svg +0 -1
  25. package/assets/icons/illus/notes-text.svg +0 -1
  26. package/assets/icons/illus/pass-text.svg +0 -1
  27. package/assets/icons/illus/photos-text.svg +0 -1
  28. package/assets/icons/illus/store-text.svg +0 -1
  29. package/assets/icons/illus/workplace-text.svg +0 -1
  30. package/react/Icons/CalendarText.jsx +0 -28
  31. package/react/Icons/ChatText.jsx +0 -73
  32. package/react/Icons/ContactsText.jsx +0 -133
  33. package/react/Icons/DriveText.jsx +0 -88
  34. package/react/Icons/MailText.jsx +0 -73
  35. package/react/Icons/NotesText.jsx +0 -88
  36. package/react/Icons/PassText.jsx +0 -15
  37. package/react/Icons/PhotosText.jsx +0 -103
  38. package/react/Icons/StoreText.jsx +0 -88
  39. package/react/Icons/WorkplaceText.jsx +0 -15
  40. package/transpiled/react/Icons/CalendarText.d.ts +0 -2
  41. package/transpiled/react/Icons/CalendarText.js +0 -27
  42. package/transpiled/react/Icons/ChatText.d.ts +0 -2
  43. package/transpiled/react/Icons/ChatText.js +0 -72
  44. package/transpiled/react/Icons/ContactsText.d.ts +0 -2
  45. package/transpiled/react/Icons/ContactsText.js +0 -132
  46. package/transpiled/react/Icons/DriveText.d.ts +0 -2
  47. package/transpiled/react/Icons/DriveText.js +0 -87
  48. package/transpiled/react/Icons/MailText.d.ts +0 -2
  49. package/transpiled/react/Icons/MailText.js +0 -72
  50. package/transpiled/react/Icons/NotesText.d.ts +0 -2
  51. package/transpiled/react/Icons/NotesText.js +0 -87
  52. package/transpiled/react/Icons/PassText.d.ts +0 -2
  53. package/transpiled/react/Icons/PassText.js +0 -15
  54. package/transpiled/react/Icons/PhotosText.d.ts +0 -2
  55. package/transpiled/react/Icons/PhotosText.js +0 -108
  56. package/transpiled/react/Icons/StoreText.d.ts +0 -2
  57. package/transpiled/react/Icons/StoreText.js +0 -92
  58. package/transpiled/react/Icons/WorkplaceText.d.ts +0 -2
  59. package/transpiled/react/Icons/WorkplaceText.js +0 -15
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [137.0.0](https://github.com/cozy/cozy-ui/compare/v136.3.0...v137.0.0) (2026-03-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * Pass appIcon and appTextIcon instead of slug to AppTitle ([8b5c6cf](https://github.com/cozy/cozy-ui/commit/8b5c6cf))
7
+ * Remove app text icons ([abea61b](https://github.com/cozy/cozy-ui/commit/abea61b))
8
+
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * All app text icons have been changed. If you imported them, copy the code from cozy-ui to your app.
13
+ * Replace <AppTitle slug="drive" /> by <AppTitle appIcon={DriveIcon} appTextIcon={DriveTextIcon} />. tag and children prop are also removed but were unused.
14
+
15
+ # [136.3.0](https://github.com/cozy/cozy-ui/compare/v136.2.2...v136.3.0) (2026-03-18)
16
+
17
+
18
+ ### Features
19
+
20
+ * Add icon for assistant and add app title for assistant :sparkles: ([d6da355](https://github.com/cozy/cozy-ui/commit/d6da355))
21
+ * Add visual indication for new items in virtualized tables ([1e5f638](https://github.com/cozy/cozy-ui/commit/1e5f638))
22
+
1
23
  ## [136.2.2](https://github.com/cozy/cozy-ui/compare/v136.2.1...v136.2.2) (2026-03-05)
2
24
 
3
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "136.2.2",
3
+ "version": "137.0.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,21 +1,15 @@
1
- Display the app title of an app with icon, brand name and app name. Support Twake theme only.
2
-
3
- You can pass a child that will be used as default value is app is not supported.
1
+ Display the app title of an app with app icon, brand icon and app text icon.
4
2
 
5
3
  ### Default
6
4
 
7
5
  ```jsx
8
6
  import AppTitle from 'cozy-ui/transpiled/react/AppTitle';
7
+ import DriveIcon from 'cozy-ui/transpiled/react/Icons/Drive';
9
8
 
10
- const slugs = ["calendar", "chat", "contacts", "drive", "mail", "notes", "pass", "store", "photos", "home"];
9
+ // This should be an a nice icon with "Drive" written with Twake font and gradient
10
+ const DriveTextMock = () => <div>Drive</div>;
11
11
 
12
- <div class="u-flex u-flex-column">
13
- {
14
- slugs.map(slug => <AppTitle slug={slug} />)
15
- }
16
- <AppTitle slug="coachco2" />
17
- <AppTitle slug="coachco2">CoachCO2</AppTitle>
18
- <AppTitle>Drive</AppTitle>
12
+ <div className="u-flex u-flex-column">
13
+ <AppTitle appIcon={DriveIcon} appTextIcon={DriveTextMock} />
19
14
  </div>
20
-
21
15
  ```
@@ -4,94 +4,20 @@ import React from 'react'
4
4
 
5
5
  import styles from './styles.styl'
6
6
  import Icon from '../Icon'
7
- import CalendarAppIcon from '../Icons/CalendarApp'
8
- import CalendarTextIcon from '../Icons/CalendarText'
9
- import ChatIcon from '../Icons/Chat'
10
- import ChatTextIcon from '../Icons/ChatText'
11
- import ContactsIcon from '../Icons/Contacts'
12
- import ContactsTextIcon from '../Icons/ContactsText'
13
- import DriveIcon from '../Icons/Drive'
14
- import DriveTextIcon from '../Icons/DriveText'
15
- import MailIcon from '../Icons/Mail'
16
- import MailTextIcon from '../Icons/MailText'
17
- import NotesIcon from '../Icons/Notes'
18
- import NotesTextIcon from '../Icons/NotesText'
19
- import PassIcon from '../Icons/Pass'
20
- import PassTextIcon from '../Icons/PassText'
21
- import PhotosIcon from '../Icons/Photos'
22
- import PhotosTextIcon from '../Icons/PhotosText'
23
- import StoreIcon from '../Icons/Store'
24
- import StoreTextIcon from '../Icons/StoreText'
25
7
  import TwakeTextIcon from '../Icons/TwakeText'
26
- import TwakeWorkplaceIcon from '../Icons/TwakeWorkplace'
27
- import WorkplaceTextIcon from '../Icons/WorkplaceText'
28
- import Typography from '../Typography'
29
8
  import { useCozyTheme } from '../providers/CozyTheme'
30
9
 
31
- const SLUG_TO_ICONS = {
32
- calendar: {
33
- icon: CalendarAppIcon,
34
- text: CalendarTextIcon
35
- },
36
- chat: {
37
- icon: ChatIcon,
38
- text: ChatTextIcon
39
- },
40
- contacts: {
41
- icon: ContactsIcon,
42
- text: ContactsTextIcon
43
- },
44
- drive: {
45
- icon: DriveIcon,
46
- text: DriveTextIcon
47
- },
48
- mail: {
49
- icon: MailIcon,
50
- text: MailTextIcon
51
- },
52
- notes: {
53
- icon: NotesIcon,
54
- text: NotesTextIcon
55
- },
56
- passwords: {
57
- icon: PassIcon,
58
- text: PassTextIcon
59
- },
60
- store: {
61
- icon: StoreIcon,
62
- text: StoreTextIcon
63
- },
64
- photos: {
65
- icon: PhotosIcon,
66
- text: PhotosTextIcon
67
- },
68
- home: {
69
- icon: TwakeWorkplaceIcon,
70
- text: WorkplaceTextIcon
71
- }
72
- }
73
-
74
- const AppTitle = ({ slug, tag, className, children, ...otherProps }) => {
10
+ const AppTitle = ({ appIcon, appTextIcon }) => {
75
11
  const { isLight } = useCozyTheme()
76
12
 
77
- const titleData = SLUG_TO_ICONS[slug]
78
-
79
- if (!titleData)
80
- return (
81
- <Typography
82
- component={tag}
83
- variant="h4"
84
- className={cx(styles['c-apptitle'], className)}
85
- {...otherProps}
86
- >
87
- {children}
88
- </Typography>
89
- )
13
+ if (!appIcon || !appTextIcon) {
14
+ return null
15
+ }
90
16
 
91
17
  return (
92
18
  <div className="u-flex u-flex-items-center">
93
19
  <Icon
94
- icon={titleData.icon}
20
+ icon={appIcon}
95
21
  size="32"
96
22
  className={styles['c-apptitle-app-icon']}
97
23
  />
@@ -105,27 +31,14 @@ const AppTitle = ({ slug, tag, className, children, ...otherProps }) => {
105
31
  isLight ? styles['c-apptitle-light'] : styles['c-apptitle-dark']
106
32
  )}
107
33
  />
108
- <Icon
109
- icon={titleData.text}
110
- width="auto"
111
- height="22"
112
- className={cx(
113
- 'u-w-auto',
114
- slug === 'home' ? styles['c-apptitle-home-icon'] : undefined
115
- )}
116
- />
34
+ <Icon icon={appTextIcon} width="auto" height="22" className="u-w-auto" />
117
35
  </div>
118
36
  )
119
37
  }
120
38
 
121
39
  AppTitle.propTypes = {
122
- slug: PropTypes.string,
123
- tag: PropTypes.string,
124
- className: PropTypes.string
125
- }
126
-
127
- AppTitle.defaultProps = {
128
- tag: 'h1'
40
+ appIcon: PropTypes.func,
41
+ appTextIcon: PropTypes.func
129
42
  }
130
43
 
131
44
  export default AppTitle
@@ -11,9 +11,3 @@
11
11
 
12
12
  .c-apptitle-app-icon
13
13
  margin-right: 4px
14
-
15
- // We need a custom height and positioning
16
- // because of the 'p' that decenter the svg
17
- .c-apptitle-home-icon
18
- margin-top: 5px
19
- height: 26px
@@ -1056,7 +1056,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
1056
1056
  import Grid from 'cozy-ui/transpiled/react/Grid'
1057
1057
  import Sprite from 'cozy-ui/transpiled/react/Icon/Sprite'
1058
1058
 
1059
- const availableIcons = ['account', 'assistant-color', 'bottom-select', 'check-white', 'cloud-broken', 'contacts', 'cozy-authentification', 'cozy-logo', 'cozy-upgrade', 'credit-card-large', 'dash-white', 'device-browser', 'device-laptop', 'device-phone', 'device-tablet', 'file-type-audio', 'file-type-banking-account' , 'file-type-bin', 'file-type-code', 'file-type-files', 'file-type-folder', 'file-type-server', 'file-type-shared-drive', 'file-type-shared-drive-grey', 'file-type-image', 'file-type-note', 'file-type-pdf', 'file-type-sheet', 'file-type-slide', 'file-type-text', 'file-type-video', 'file-type-zip', 'forbidden-sign', 'google', 'keychain', 'logout-large', 'papers', 'only-office', 'store', 'top-select', 'trash-duotone', 'cozy'];
1059
+ const availableIcons = ['account', 'ai-text', 'assistant-color', 'bottom-select', 'check-white', 'cloud-broken', 'contacts', 'cozy-authentification', 'cozy-logo', 'cozy-upgrade', 'credit-card-large', 'dash-white', 'device-browser', 'device-laptop', 'device-phone', 'device-tablet', 'file-type-audio', 'file-type-banking-account' , 'file-type-bin', 'file-type-code', 'file-type-files', 'file-type-folder', 'file-type-server', 'file-type-shared-drive', 'file-type-shared-drive-grey', 'file-type-image', 'file-type-note', 'file-type-pdf', 'file-type-sheet', 'file-type-slide', 'file-type-text', 'file-type-video', 'file-type-zip', 'forbidden-sign', 'google', 'keychain', 'logout-large', 'papers', 'only-office', 'store', 'top-select', 'trash-duotone', 'cozy'];
1060
1060
 
1061
1061
  <Grid container spacing={2}>
1062
1062
  <Sprite />
@@ -538,6 +538,9 @@ export const makeLightNormalOverrides = theme => ({
538
538
  },
539
539
  MuiTableRow: {
540
540
  root: {
541
+ '&.new': {
542
+ backgroundColor: theme.palette.action.hover
543
+ },
541
544
  '&.disabled': {
542
545
  cursor: 'pointer',
543
546
  pointerEvents: 'none',
@@ -86,9 +86,10 @@ const TableRow = ({ item, context, componentsProps, ...props }) => {
86
86
  <TableRowClassic
87
87
  {...props}
88
88
  ref={node => dragRef(dropRef(node))}
89
- selected={isSelected || dropCollect.isOver || isNew}
89
+ selected={isSelected || dropCollect.isOver}
90
90
  className={cx(
91
- dragCollect.isDragging ? 'virtualized u-o-50' : 'virtualized'
91
+ dragCollect.isDragging ? 'virtualized u-o-50' : 'virtualized',
92
+ { new: isNew }
92
93
  )}
93
94
  disabled={isDisabled}
94
95
  hover
@@ -1,20 +1,12 @@
1
1
  export default AppTitle;
2
- declare function AppTitle({ slug, tag, className, children, ...otherProps }: {
3
- [x: string]: any;
4
- slug: any;
5
- tag: any;
6
- className: any;
7
- children: any;
8
- }): JSX.Element;
2
+ declare function AppTitle({ appIcon, appTextIcon }: {
3
+ appIcon: any;
4
+ appTextIcon: any;
5
+ }): JSX.Element | null;
9
6
  declare namespace AppTitle {
10
7
  namespace propTypes {
11
- const slug: PropTypes.Requireable<string>;
12
- const tag: PropTypes.Requireable<string>;
13
- const className: PropTypes.Requireable<string>;
14
- }
15
- namespace defaultProps {
16
- const tag_1: string;
17
- export { tag_1 as tag };
8
+ const appIcon: PropTypes.Requireable<(...args: any[]) => any>;
9
+ const appTextIcon: PropTypes.Requireable<(...args: any[]) => any>;
18
10
  }
19
11
  }
20
12
  import PropTypes from "prop-types";
@@ -1,6 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["slug", "tag", "className", "children"];
4
1
  import cx from 'classnames';
5
2
  import PropTypes from 'prop-types';
6
3
  import React from 'react';
@@ -8,96 +5,27 @@ var styles = {
8
5
  "c-apptitle": "styles__c-apptitle___eqV9l",
9
6
  "c-apptitle-light": "styles__c-apptitle-light___49VIZ",
10
7
  "c-apptitle-dark": "styles__c-apptitle-dark___13RM5",
11
- "c-apptitle-app-icon": "styles__c-apptitle-app-icon___oQp8q",
12
- "c-apptitle-home-icon": "styles__c-apptitle-home-icon___1xJsd"
8
+ "c-apptitle-app-icon": "styles__c-apptitle-app-icon___oQp8q"
13
9
  };
14
10
  import Icon from "cozy-ui/transpiled/react/Icon";
15
- import CalendarAppIcon from "cozy-ui/transpiled/react/Icons/CalendarApp";
16
- import CalendarTextIcon from "cozy-ui/transpiled/react/Icons/CalendarText";
17
- import ChatIcon from "cozy-ui/transpiled/react/Icons/Chat";
18
- import ChatTextIcon from "cozy-ui/transpiled/react/Icons/ChatText";
19
- import ContactsIcon from "cozy-ui/transpiled/react/Icons/Contacts";
20
- import ContactsTextIcon from "cozy-ui/transpiled/react/Icons/ContactsText";
21
- import DriveIcon from "cozy-ui/transpiled/react/Icons/Drive";
22
- import DriveTextIcon from "cozy-ui/transpiled/react/Icons/DriveText";
23
- import MailIcon from "cozy-ui/transpiled/react/Icons/Mail";
24
- import MailTextIcon from "cozy-ui/transpiled/react/Icons/MailText";
25
- import NotesIcon from "cozy-ui/transpiled/react/Icons/Notes";
26
- import NotesTextIcon from "cozy-ui/transpiled/react/Icons/NotesText";
27
- import PassIcon from "cozy-ui/transpiled/react/Icons/Pass";
28
- import PassTextIcon from "cozy-ui/transpiled/react/Icons/PassText";
29
- import PhotosIcon from "cozy-ui/transpiled/react/Icons/Photos";
30
- import PhotosTextIcon from "cozy-ui/transpiled/react/Icons/PhotosText";
31
- import StoreIcon from "cozy-ui/transpiled/react/Icons/Store";
32
- import StoreTextIcon from "cozy-ui/transpiled/react/Icons/StoreText";
33
11
  import TwakeTextIcon from "cozy-ui/transpiled/react/Icons/TwakeText";
34
- import TwakeWorkplaceIcon from "cozy-ui/transpiled/react/Icons/TwakeWorkplace";
35
- import WorkplaceTextIcon from "cozy-ui/transpiled/react/Icons/WorkplaceText";
36
- import Typography from "cozy-ui/transpiled/react/Typography";
37
12
  import { useCozyTheme } from "cozy-ui/transpiled/react/providers/CozyTheme";
38
- var SLUG_TO_ICONS = {
39
- calendar: {
40
- icon: CalendarAppIcon,
41
- text: CalendarTextIcon
42
- },
43
- chat: {
44
- icon: ChatIcon,
45
- text: ChatTextIcon
46
- },
47
- contacts: {
48
- icon: ContactsIcon,
49
- text: ContactsTextIcon
50
- },
51
- drive: {
52
- icon: DriveIcon,
53
- text: DriveTextIcon
54
- },
55
- mail: {
56
- icon: MailIcon,
57
- text: MailTextIcon
58
- },
59
- notes: {
60
- icon: NotesIcon,
61
- text: NotesTextIcon
62
- },
63
- passwords: {
64
- icon: PassIcon,
65
- text: PassTextIcon
66
- },
67
- store: {
68
- icon: StoreIcon,
69
- text: StoreTextIcon
70
- },
71
- photos: {
72
- icon: PhotosIcon,
73
- text: PhotosTextIcon
74
- },
75
- home: {
76
- icon: TwakeWorkplaceIcon,
77
- text: WorkplaceTextIcon
78
- }
79
- };
80
13
 
81
14
  var AppTitle = function AppTitle(_ref) {
82
- var slug = _ref.slug,
83
- tag = _ref.tag,
84
- className = _ref.className,
85
- children = _ref.children,
86
- otherProps = _objectWithoutProperties(_ref, _excluded);
15
+ var appIcon = _ref.appIcon,
16
+ appTextIcon = _ref.appTextIcon;
87
17
 
88
18
  var _useCozyTheme = useCozyTheme(),
89
19
  isLight = _useCozyTheme.isLight;
90
20
 
91
- var titleData = SLUG_TO_ICONS[slug];
92
- if (!titleData) return /*#__PURE__*/React.createElement(Typography, _extends({
93
- component: tag,
94
- variant: "h4",
95
- className: cx(styles['c-apptitle'], className)
96
- }, otherProps), children);
21
+ if (!appIcon || !appTextIcon) {
22
+ return null;
23
+ }
24
+
97
25
  return /*#__PURE__*/React.createElement("div", {
98
26
  className: "u-flex u-flex-items-center"
99
27
  }, /*#__PURE__*/React.createElement(Icon, {
100
- icon: titleData.icon,
28
+ icon: appIcon,
101
29
  size: "32",
102
30
  className: styles['c-apptitle-app-icon']
103
31
  }), /*#__PURE__*/React.createElement(Icon, {
@@ -106,19 +34,15 @@ var AppTitle = function AppTitle(_ref) {
106
34
  height: "22",
107
35
  className: cx('u-mr-half', 'u-w-auto', isLight ? styles['c-apptitle-light'] : styles['c-apptitle-dark'])
108
36
  }), /*#__PURE__*/React.createElement(Icon, {
109
- icon: titleData.text,
37
+ icon: appTextIcon,
110
38
  width: "auto",
111
39
  height: "22",
112
- className: cx('u-w-auto', slug === 'home' ? styles['c-apptitle-home-icon'] : undefined)
40
+ className: "u-w-auto"
113
41
  }));
114
42
  };
115
43
 
116
44
  AppTitle.propTypes = {
117
- slug: PropTypes.string,
118
- tag: PropTypes.string,
119
- className: PropTypes.string
120
- };
121
- AppTitle.defaultProps = {
122
- tag: 'h1'
45
+ appIcon: PropTypes.func,
46
+ appTextIcon: PropTypes.func
123
47
  };
124
48
  export default AppTitle;