cozy-ui 136.3.0 → 137.0.1
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 +21 -0
- package/assets/icons/illus/assistant-color.svg +1 -1
- package/package.json +1 -1
- package/react/AppTitle/Readme.md +6 -12
- package/react/AppTitle/index.jsx +8 -100
- package/react/AppTitle/styles.styl +0 -6
- package/react/Icon/Readme.md +0 -2
- package/react/Icons/AssistantColor.jsx +15 -22
- package/transpiled/react/AppTitle/index.d.ts +6 -14
- package/transpiled/react/AppTitle/index.js +12 -93
- package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/AssistantColor.js +16 -21
- package/transpiled/react/stylesheet.css +1 -1
- package/assets/icons/illus/ai-text.svg +0 -1
- package/assets/icons/illus/calendar-text.svg +0 -1
- package/assets/icons/illus/chat-text.svg +0 -1
- package/assets/icons/illus/contacts-text.svg +0 -1
- package/assets/icons/illus/drive-text.svg +0 -1
- package/assets/icons/illus/mail-text.svg +0 -1
- package/assets/icons/illus/notes-text.svg +0 -1
- package/assets/icons/illus/pass-text.svg +0 -1
- package/assets/icons/illus/photos-text.svg +0 -1
- package/assets/icons/illus/store-text.svg +0 -1
- package/assets/icons/illus/workplace-text.svg +0 -1
- package/react/Icons/AiText.jsx +0 -15
- package/react/Icons/CalendarText.jsx +0 -28
- package/react/Icons/ChatText.jsx +0 -73
- package/react/Icons/ContactsText.jsx +0 -133
- package/react/Icons/DriveText.jsx +0 -88
- package/react/Icons/MailText.jsx +0 -73
- package/react/Icons/NotesText.jsx +0 -88
- package/react/Icons/PassText.jsx +0 -15
- package/react/Icons/PhotosText.jsx +0 -103
- package/react/Icons/StoreText.jsx +0 -88
- package/react/Icons/WorkplaceText.jsx +0 -15
- package/transpiled/react/Icons/AiText.d.ts +0 -2
- package/transpiled/react/Icons/AiText.js +0 -15
- package/transpiled/react/Icons/CalendarText.d.ts +0 -2
- package/transpiled/react/Icons/CalendarText.js +0 -27
- package/transpiled/react/Icons/ChatText.d.ts +0 -2
- package/transpiled/react/Icons/ChatText.js +0 -72
- package/transpiled/react/Icons/ContactsText.d.ts +0 -2
- package/transpiled/react/Icons/ContactsText.js +0 -132
- package/transpiled/react/Icons/DriveText.d.ts +0 -2
- package/transpiled/react/Icons/DriveText.js +0 -87
- package/transpiled/react/Icons/MailText.d.ts +0 -2
- package/transpiled/react/Icons/MailText.js +0 -72
- package/transpiled/react/Icons/NotesText.d.ts +0 -2
- package/transpiled/react/Icons/NotesText.js +0 -87
- package/transpiled/react/Icons/PassText.d.ts +0 -2
- package/transpiled/react/Icons/PassText.js +0 -15
- package/transpiled/react/Icons/PhotosText.d.ts +0 -2
- package/transpiled/react/Icons/PhotosText.js +0 -108
- package/transpiled/react/Icons/StoreText.d.ts +0 -2
- package/transpiled/react/Icons/StoreText.js +0 -92
- package/transpiled/react/Icons/WorkplaceText.d.ts +0 -2
- package/transpiled/react/Icons/WorkplaceText.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [137.0.1](https://github.com/cozy/cozy-ui/compare/v137.0.0...v137.0.1) (2026-03-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Adjust assistant color icon :bug: ([525911b](https://github.com/cozy/cozy-ui/commit/525911b))
|
|
7
|
+
|
|
8
|
+
# [137.0.0](https://github.com/cozy/cozy-ui/compare/v136.3.0...v137.0.0) (2026-03-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Pass appIcon and appTextIcon instead of slug to AppTitle ([8b5c6cf](https://github.com/cozy/cozy-ui/commit/8b5c6cf))
|
|
14
|
+
* Remove app text icons ([abea61b](https://github.com/cozy/cozy-ui/commit/abea61b))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* All app text icons have been changed. If you imported them, copy the code from cozy-ui to your app.
|
|
20
|
+
* Replace <AppTitle slug="drive" /> by <AppTitle appIcon={DriveIcon} appTextIcon={DriveTextIcon} />. tag and children prop are also removed but were unused.
|
|
21
|
+
|
|
1
22
|
# [136.3.0](https://github.com/cozy/cozy-ui/compare/v136.2.2...v136.3.0) (2026-03-18)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_25355_124591)"><path d="M6.626 10.332a1.333 1.333 0 0 0-.958-.958L1.578 8.32a.333.333 0 0 1 0-.642l4.09-1.055a1.333 1.333 0 0 0 .958-.957l1.055-4.09a.333.333 0 0 1 .642 0l1.054 4.09a1.333 1.333 0 0 0 .958.958l4.09 1.054a.333.333 0 0 1 0 .642l-4.09 1.054a1.333 1.333 0 0 0-.958.958l-1.055 4.09a.333.333 0 0 1-.642 0l-1.054-4.09Z" stroke="url(#paint0_linear_25355_124591)" stroke-opacity=".9" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.335 1.336c.368 0 .667.299.667.667v.665h.668a.667.667 0 0 1 0 1.334h-.668v.668a.667.667 0 0 1-1.334 0v-.668h-.665a.667.667 0 0 1 0-1.334h.665v-.665c0-.368.299-.667.667-.667Z" fill="url(#paint1_linear_25355_124591)" fill-opacity=".9"/><path d="M2.667 10.668c.367 0 .664.297.666.664a.667.667 0 0 1 .001 1.333v.003a.667.667 0 0 1-1.334 0v-.002h-.001a.667.667 0 0 1 0-1.334H2a.667.667 0 0 1 .667-.664Z" fill="url(#paint2_linear_25355_124591)" fill-opacity=".9"/></g><defs><linearGradient id="paint0_linear_25355_124591" x1="1.336" y1="7.999" x2="19.625" y2="7.999" gradientUnits="userSpaceOnUse"><stop stop-color="#00B7FF"/><stop offset=".567" stop-color="#E06DD1"/><stop offset="1" stop-color="#FF0"/></linearGradient><linearGradient id="paint1_linear_25355_124591" x1="11.336" y1="3.336" x2="16.822" y2="3.336" gradientUnits="userSpaceOnUse"><stop stop-color="#00B7FF"/><stop offset=".567" stop-color="#E06DD1"/><stop offset="1" stop-color="#FF0"/></linearGradient><linearGradient id="paint2_linear_25355_124591" x1="1.332" y1="12.002" x2="4.99" y2="12.002" gradientUnits="userSpaceOnUse"><stop stop-color="#00B7FF"/><stop offset=".567" stop-color="#E06DD1"/><stop offset="1" stop-color="#FF0"/></linearGradient><clipPath id="clip0_25355_124591"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
package/package.json
CHANGED
package/react/AppTitle/Readme.md
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
Display the app title of an app with icon, brand
|
|
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
|
-
|
|
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
|
|
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
|
```
|
package/react/AppTitle/index.jsx
CHANGED
|
@@ -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
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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={
|
|
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
|
-
|
|
128
|
-
|
|
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
|
package/react/Icon/Readme.md
CHANGED
|
@@ -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,
|
|
@@ -3,37 +3,30 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
function SvgAssistantColor(props) {
|
|
5
5
|
return (
|
|
6
|
-
<svg viewBox="0 0 16 16" fill="
|
|
7
|
-
<g clipPath="url(#assistant-
|
|
6
|
+
<svg viewBox="0 0 16 16" fill="transparent" color="transparent" {...props}>
|
|
7
|
+
<g clipPath="url(#assistant-color_svg__clip0_25355_124591)">
|
|
8
8
|
<path
|
|
9
9
|
d="M6.626 10.332a1.333 1.333 0 00-.958-.958L1.578 8.32a.333.333 0 010-.642l4.09-1.055a1.333 1.333 0 00.958-.957l1.055-4.09a.333.333 0 01.642 0l1.054 4.09a1.333 1.333 0 00.958.958l4.09 1.054a.333.333 0 010 .642l-4.09 1.054a1.333 1.333 0 00-.958.958l-1.055 4.09a.333.333 0 01-.642 0l-1.054-4.09z"
|
|
10
|
-
stroke="#
|
|
11
|
-
strokeWidth={1.333}
|
|
12
|
-
strokeLinecap="round"
|
|
13
|
-
strokeLinejoin="round"
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
d="M6.626 10.332a1.333 1.333 0 00-.958-.958L1.578 8.32a.333.333 0 010-.642l4.09-1.055a1.333 1.333 0 00.958-.957l1.055-4.09a.333.333 0 01.642 0l1.054 4.09a1.333 1.333 0 00.958.958l4.09 1.054a.333.333 0 010 .642l-4.09 1.054a1.333 1.333 0 00-.958.958l-1.055 4.09a.333.333 0 01-.642 0l-1.054-4.09z"
|
|
17
|
-
stroke="url(#assistant-color_svg__paint0_linear_19251_33606)"
|
|
10
|
+
stroke="url(#assistant-color_svg__paint0_linear_25355_124591)"
|
|
18
11
|
strokeOpacity={0.9}
|
|
19
12
|
strokeWidth={1.333}
|
|
20
13
|
strokeLinecap="round"
|
|
21
14
|
strokeLinejoin="round"
|
|
22
15
|
/>
|
|
23
16
|
<path
|
|
24
|
-
d="M13.335 1.
|
|
25
|
-
fill="url(#assistant-
|
|
17
|
+
d="M13.335 1.336c.368 0 .667.299.667.667v.665h.668a.667.667 0 010 1.334h-.668v.668a.667.667 0 01-1.334 0v-.668h-.665a.667.667 0 010-1.334h.665v-.665c0-.368.299-.667.667-.667z"
|
|
18
|
+
fill="url(#assistant-color_svg__paint1_linear_25355_124591)"
|
|
26
19
|
fillOpacity={0.9}
|
|
27
20
|
/>
|
|
28
21
|
<path
|
|
29
|
-
d="M2.667 10.
|
|
30
|
-
fill="url(#assistant-
|
|
22
|
+
d="M2.667 10.668c.367 0 .664.297.666.664a.667.667 0 01.001 1.333v.003a.667.667 0 01-1.334 0v-.002h-.001a.667.667 0 010-1.334H2a.667.667 0 01.667-.664z"
|
|
23
|
+
fill="url(#assistant-color_svg__paint2_linear_25355_124591)"
|
|
31
24
|
fillOpacity={0.9}
|
|
32
25
|
/>
|
|
33
26
|
</g>
|
|
34
27
|
<defs>
|
|
35
28
|
<linearGradient
|
|
36
|
-
id="assistant-
|
|
29
|
+
id="assistant-color_svg__paint0_linear_25355_124591"
|
|
37
30
|
x1={1.336}
|
|
38
31
|
y1={7.999}
|
|
39
32
|
x2={19.625}
|
|
@@ -45,11 +38,11 @@ function SvgAssistantColor(props) {
|
|
|
45
38
|
<stop offset={1} stopColor="#FF0" />
|
|
46
39
|
</linearGradient>
|
|
47
40
|
<linearGradient
|
|
48
|
-
id="assistant-
|
|
41
|
+
id="assistant-color_svg__paint1_linear_25355_124591"
|
|
49
42
|
x1={11.336}
|
|
50
|
-
y1={3.
|
|
43
|
+
y1={3.336}
|
|
51
44
|
x2={16.822}
|
|
52
|
-
y2={3.
|
|
45
|
+
y2={3.336}
|
|
53
46
|
gradientUnits="userSpaceOnUse"
|
|
54
47
|
>
|
|
55
48
|
<stop stopColor="#00B7FF" />
|
|
@@ -57,18 +50,18 @@ function SvgAssistantColor(props) {
|
|
|
57
50
|
<stop offset={1} stopColor="#FF0" />
|
|
58
51
|
</linearGradient>
|
|
59
52
|
<linearGradient
|
|
60
|
-
id="assistant-
|
|
53
|
+
id="assistant-color_svg__paint2_linear_25355_124591"
|
|
61
54
|
x1={1.332}
|
|
62
|
-
y1={12.
|
|
55
|
+
y1={12.002}
|
|
63
56
|
x2={4.99}
|
|
64
|
-
y2={12.
|
|
57
|
+
y2={12.002}
|
|
65
58
|
gradientUnits="userSpaceOnUse"
|
|
66
59
|
>
|
|
67
60
|
<stop stopColor="#00B7FF" />
|
|
68
61
|
<stop offset={0.567} stopColor="#E06DD1" />
|
|
69
62
|
<stop offset={1} stopColor="#FF0" />
|
|
70
63
|
</linearGradient>
|
|
71
|
-
<clipPath id="assistant-
|
|
64
|
+
<clipPath id="assistant-color_svg__clip0_25355_124591">
|
|
72
65
|
<path fill="#fff" d="M0 0h16v16H0z" />
|
|
73
66
|
</clipPath>
|
|
74
67
|
</defs>
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
export default AppTitle;
|
|
2
|
-
declare function AppTitle({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
12
|
-
const
|
|
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
|
|
88
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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:
|
|
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:
|
|
37
|
+
icon: appTextIcon,
|
|
115
38
|
width: "auto",
|
|
116
39
|
height: "22",
|
|
117
|
-
className:
|
|
40
|
+
className: "u-w-auto"
|
|
118
41
|
}));
|
|
119
42
|
};
|
|
120
43
|
|
|
121
44
|
AppTitle.propTypes = {
|
|
122
|
-
|
|
123
|
-
|
|
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;
|