cozy-ui 136.3.0 → 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 (55) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/react/AppTitle/Readme.md +6 -12
  4. package/react/AppTitle/index.jsx +8 -100
  5. package/react/AppTitle/styles.styl +0 -6
  6. package/react/Icon/Readme.md +0 -2
  7. package/transpiled/react/AppTitle/index.d.ts +6 -14
  8. package/transpiled/react/AppTitle/index.js +12 -93
  9. package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
  10. package/transpiled/react/Icon/icons-sprite.js +1 -1
  11. package/transpiled/react/stylesheet.css +1 -1
  12. package/assets/icons/illus/ai-text.svg +0 -1
  13. package/assets/icons/illus/calendar-text.svg +0 -1
  14. package/assets/icons/illus/chat-text.svg +0 -1
  15. package/assets/icons/illus/contacts-text.svg +0 -1
  16. package/assets/icons/illus/drive-text.svg +0 -1
  17. package/assets/icons/illus/mail-text.svg +0 -1
  18. package/assets/icons/illus/notes-text.svg +0 -1
  19. package/assets/icons/illus/pass-text.svg +0 -1
  20. package/assets/icons/illus/photos-text.svg +0 -1
  21. package/assets/icons/illus/store-text.svg +0 -1
  22. package/assets/icons/illus/workplace-text.svg +0 -1
  23. package/react/Icons/AiText.jsx +0 -15
  24. package/react/Icons/CalendarText.jsx +0 -28
  25. package/react/Icons/ChatText.jsx +0 -73
  26. package/react/Icons/ContactsText.jsx +0 -133
  27. package/react/Icons/DriveText.jsx +0 -88
  28. package/react/Icons/MailText.jsx +0 -73
  29. package/react/Icons/NotesText.jsx +0 -88
  30. package/react/Icons/PassText.jsx +0 -15
  31. package/react/Icons/PhotosText.jsx +0 -103
  32. package/react/Icons/StoreText.jsx +0 -88
  33. package/react/Icons/WorkplaceText.jsx +0 -15
  34. package/transpiled/react/Icons/AiText.d.ts +0 -2
  35. package/transpiled/react/Icons/AiText.js +0 -15
  36. package/transpiled/react/Icons/CalendarText.d.ts +0 -2
  37. package/transpiled/react/Icons/CalendarText.js +0 -27
  38. package/transpiled/react/Icons/ChatText.d.ts +0 -2
  39. package/transpiled/react/Icons/ChatText.js +0 -72
  40. package/transpiled/react/Icons/ContactsText.d.ts +0 -2
  41. package/transpiled/react/Icons/ContactsText.js +0 -132
  42. package/transpiled/react/Icons/DriveText.d.ts +0 -2
  43. package/transpiled/react/Icons/DriveText.js +0 -87
  44. package/transpiled/react/Icons/MailText.d.ts +0 -2
  45. package/transpiled/react/Icons/MailText.js +0 -72
  46. package/transpiled/react/Icons/NotesText.d.ts +0 -2
  47. package/transpiled/react/Icons/NotesText.js +0 -87
  48. package/transpiled/react/Icons/PassText.d.ts +0 -2
  49. package/transpiled/react/Icons/PassText.js +0 -15
  50. package/transpiled/react/Icons/PhotosText.d.ts +0 -2
  51. package/transpiled/react/Icons/PhotosText.js +0 -108
  52. package/transpiled/react/Icons/StoreText.d.ts +0 -2
  53. package/transpiled/react/Icons/StoreText.js +0 -92
  54. package/transpiled/react/Icons/WorkplaceText.d.ts +0 -2
  55. package/transpiled/react/Icons/WorkplaceText.js +0 -15
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
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
+
1
15
  # [136.3.0](https://github.com/cozy/cozy-ui/compare/v136.2.2...v136.3.0) (2026-03-18)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "136.3.0",
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,99 +4,20 @@ import React from 'react'
4
4
 
5
5
  import styles from './styles.styl'
6
6
  import Icon from '../Icon'
7
- import AITextIcon from '../Icons/AiText'
8
- import CalendarAppIcon from '../Icons/CalendarApp'
9
- import CalendarTextIcon from '../Icons/CalendarText'
10
- import ChatIcon from '../Icons/Chat'
11
- import ChatTextIcon from '../Icons/ChatText'
12
- import ContactsIcon from '../Icons/Contacts'
13
- import ContactsTextIcon from '../Icons/ContactsText'
14
- import DriveIcon from '../Icons/Drive'
15
- import DriveTextIcon from '../Icons/DriveText'
16
- import MailIcon from '../Icons/Mail'
17
- import MailTextIcon from '../Icons/MailText'
18
- import NotesIcon from '../Icons/Notes'
19
- import NotesTextIcon from '../Icons/NotesText'
20
- import PassIcon from '../Icons/Pass'
21
- import PassTextIcon from '../Icons/PassText'
22
- import PhotosIcon from '../Icons/Photos'
23
- import PhotosTextIcon from '../Icons/PhotosText'
24
- import StoreIcon from '../Icons/Store'
25
- import StoreTextIcon from '../Icons/StoreText'
26
7
  import TwakeTextIcon from '../Icons/TwakeText'
27
- import TwakeWorkplaceIcon from '../Icons/TwakeWorkplace'
28
- import WorkplaceTextIcon from '../Icons/WorkplaceText'
29
- import Typography from '../Typography'
30
8
  import { useCozyTheme } from '../providers/CozyTheme'
31
9
 
32
- const SLUG_TO_ICONS = {
33
- calendar: {
34
- icon: CalendarAppIcon,
35
- text: CalendarTextIcon
36
- },
37
- chat: {
38
- icon: ChatIcon,
39
- text: ChatTextIcon
40
- },
41
- contacts: {
42
- icon: ContactsIcon,
43
- text: ContactsTextIcon
44
- },
45
- drive: {
46
- icon: DriveIcon,
47
- text: DriveTextIcon
48
- },
49
- mail: {
50
- icon: MailIcon,
51
- text: MailTextIcon
52
- },
53
- notes: {
54
- icon: NotesIcon,
55
- text: NotesTextIcon
56
- },
57
- passwords: {
58
- icon: PassIcon,
59
- text: PassTextIcon
60
- },
61
- store: {
62
- icon: StoreIcon,
63
- text: StoreTextIcon
64
- },
65
- photos: {
66
- icon: PhotosIcon,
67
- text: PhotosTextIcon
68
- },
69
- home: {
70
- icon: TwakeWorkplaceIcon,
71
- text: WorkplaceTextIcon
72
- },
73
- assistant: {
74
- icon: null,
75
- text: AITextIcon
76
- }
77
- }
78
-
79
- const AppTitle = ({ slug, tag, className, children, ...otherProps }) => {
10
+ const AppTitle = ({ appIcon, appTextIcon }) => {
80
11
  const { isLight } = useCozyTheme()
81
12
 
82
- const titleData = SLUG_TO_ICONS[slug]
83
-
84
- if (!titleData)
85
- return (
86
- <Typography
87
- component={tag}
88
- variant="h4"
89
- className={cx(styles['c-apptitle'], className)}
90
- {...otherProps}
91
- >
92
- {children}
93
- </Typography>
94
- )
13
+ if (!appIcon || !appTextIcon) {
14
+ return null
15
+ }
95
16
 
96
17
  return (
97
18
  <div className="u-flex u-flex-items-center">
98
19
  <Icon
99
- icon={titleData.icon}
20
+ icon={appIcon}
100
21
  size="32"
101
22
  className={styles['c-apptitle-app-icon']}
102
23
  />
@@ -110,27 +31,14 @@ const AppTitle = ({ slug, tag, className, children, ...otherProps }) => {
110
31
  isLight ? styles['c-apptitle-light'] : styles['c-apptitle-dark']
111
32
  )}
112
33
  />
113
- <Icon
114
- icon={titleData.text}
115
- width="auto"
116
- height="22"
117
- className={cx(
118
- 'u-w-auto',
119
- slug === 'home' ? styles['c-apptitle-home-icon'] : undefined
120
- )}
121
- />
34
+ <Icon icon={appTextIcon} width="auto" height="22" className="u-w-auto" />
122
35
  </div>
123
36
  )
124
37
  }
125
38
 
126
39
  AppTitle.propTypes = {
127
- slug: PropTypes.string,
128
- tag: PropTypes.string,
129
- className: PropTypes.string
130
- }
131
-
132
- AppTitle.defaultProps = {
133
- tag: 'h1'
40
+ appIcon: PropTypes.func,
41
+ appTextIcon: PropTypes.func
134
42
  }
135
43
 
136
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
@@ -723,7 +723,6 @@ import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
723
723
  import cx from 'classnames'
724
724
 
725
725
  import AccountIcon from 'cozy-ui/transpiled/react/Icons/Account'
726
- import AITextIcon from 'cozy-ui/transpiled/react/Icons/AiText'
727
726
  import AssistantColorIcon from 'cozy-ui/transpiled/react/Icons/AssistantColor'
728
727
  import BottomSelectIcon from 'cozy-ui/transpiled/react/Icons/BottomSelect'
729
728
  import CreditCardLargeIcon from 'cozy-ui/transpiled/react/Icons/CreditCardLarge'
@@ -780,7 +779,6 @@ import TwakeWorkplace from 'cozy-ui/transpiled/react/Icons/TwakeWorkplace'
780
779
 
781
780
  const icons = [
782
781
  AccountIcon,
783
- AITextIcon,
784
782
  AssistantColorIcon,
785
783
  BottomSelectIcon,
786
784
  ChatIcon,
@@ -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,101 +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 AITextIcon from "cozy-ui/transpiled/react/Icons/AiText";
16
- import CalendarAppIcon from "cozy-ui/transpiled/react/Icons/CalendarApp";
17
- import CalendarTextIcon from "cozy-ui/transpiled/react/Icons/CalendarText";
18
- import ChatIcon from "cozy-ui/transpiled/react/Icons/Chat";
19
- import ChatTextIcon from "cozy-ui/transpiled/react/Icons/ChatText";
20
- import ContactsIcon from "cozy-ui/transpiled/react/Icons/Contacts";
21
- import ContactsTextIcon from "cozy-ui/transpiled/react/Icons/ContactsText";
22
- import DriveIcon from "cozy-ui/transpiled/react/Icons/Drive";
23
- import DriveTextIcon from "cozy-ui/transpiled/react/Icons/DriveText";
24
- import MailIcon from "cozy-ui/transpiled/react/Icons/Mail";
25
- import MailTextIcon from "cozy-ui/transpiled/react/Icons/MailText";
26
- import NotesIcon from "cozy-ui/transpiled/react/Icons/Notes";
27
- import NotesTextIcon from "cozy-ui/transpiled/react/Icons/NotesText";
28
- import PassIcon from "cozy-ui/transpiled/react/Icons/Pass";
29
- import PassTextIcon from "cozy-ui/transpiled/react/Icons/PassText";
30
- import PhotosIcon from "cozy-ui/transpiled/react/Icons/Photos";
31
- import PhotosTextIcon from "cozy-ui/transpiled/react/Icons/PhotosText";
32
- import StoreIcon from "cozy-ui/transpiled/react/Icons/Store";
33
- import StoreTextIcon from "cozy-ui/transpiled/react/Icons/StoreText";
34
11
  import TwakeTextIcon from "cozy-ui/transpiled/react/Icons/TwakeText";
35
- import TwakeWorkplaceIcon from "cozy-ui/transpiled/react/Icons/TwakeWorkplace";
36
- import WorkplaceTextIcon from "cozy-ui/transpiled/react/Icons/WorkplaceText";
37
- import Typography from "cozy-ui/transpiled/react/Typography";
38
12
  import { useCozyTheme } from "cozy-ui/transpiled/react/providers/CozyTheme";
39
- var SLUG_TO_ICONS = {
40
- calendar: {
41
- icon: CalendarAppIcon,
42
- text: CalendarTextIcon
43
- },
44
- chat: {
45
- icon: ChatIcon,
46
- text: ChatTextIcon
47
- },
48
- contacts: {
49
- icon: ContactsIcon,
50
- text: ContactsTextIcon
51
- },
52
- drive: {
53
- icon: DriveIcon,
54
- text: DriveTextIcon
55
- },
56
- mail: {
57
- icon: MailIcon,
58
- text: MailTextIcon
59
- },
60
- notes: {
61
- icon: NotesIcon,
62
- text: NotesTextIcon
63
- },
64
- passwords: {
65
- icon: PassIcon,
66
- text: PassTextIcon
67
- },
68
- store: {
69
- icon: StoreIcon,
70
- text: StoreTextIcon
71
- },
72
- photos: {
73
- icon: PhotosIcon,
74
- text: PhotosTextIcon
75
- },
76
- home: {
77
- icon: TwakeWorkplaceIcon,
78
- text: WorkplaceTextIcon
79
- },
80
- assistant: {
81
- icon: null,
82
- text: AITextIcon
83
- }
84
- };
85
13
 
86
14
  var AppTitle = function AppTitle(_ref) {
87
- var slug = _ref.slug,
88
- tag = _ref.tag,
89
- className = _ref.className,
90
- children = _ref.children,
91
- otherProps = _objectWithoutProperties(_ref, _excluded);
15
+ var appIcon = _ref.appIcon,
16
+ appTextIcon = _ref.appTextIcon;
92
17
 
93
18
  var _useCozyTheme = useCozyTheme(),
94
19
  isLight = _useCozyTheme.isLight;
95
20
 
96
- var titleData = SLUG_TO_ICONS[slug];
97
- if (!titleData) return /*#__PURE__*/React.createElement(Typography, _extends({
98
- component: tag,
99
- variant: "h4",
100
- className: cx(styles['c-apptitle'], className)
101
- }, otherProps), children);
21
+ if (!appIcon || !appTextIcon) {
22
+ return null;
23
+ }
24
+
102
25
  return /*#__PURE__*/React.createElement("div", {
103
26
  className: "u-flex u-flex-items-center"
104
27
  }, /*#__PURE__*/React.createElement(Icon, {
105
- icon: titleData.icon,
28
+ icon: appIcon,
106
29
  size: "32",
107
30
  className: styles['c-apptitle-app-icon']
108
31
  }), /*#__PURE__*/React.createElement(Icon, {
@@ -111,19 +34,15 @@ var AppTitle = function AppTitle(_ref) {
111
34
  height: "22",
112
35
  className: cx('u-mr-half', 'u-w-auto', isLight ? styles['c-apptitle-light'] : styles['c-apptitle-dark'])
113
36
  }), /*#__PURE__*/React.createElement(Icon, {
114
- icon: titleData.text,
37
+ icon: appTextIcon,
115
38
  width: "auto",
116
39
  height: "22",
117
- className: cx('u-w-auto', slug === 'home' ? styles['c-apptitle-home-icon'] : undefined)
40
+ className: "u-w-auto"
118
41
  }));
119
42
  };
120
43
 
121
44
  AppTitle.propTypes = {
122
- slug: PropTypes.string,
123
- tag: PropTypes.string,
124
- className: PropTypes.string
125
- };
126
- AppTitle.defaultProps = {
127
- tag: 'h1'
45
+ appIcon: PropTypes.func,
46
+ appTextIcon: PropTypes.func
128
47
  };
129
48
  export default AppTitle;