cozy-ui 66.2.4 → 67.0.2

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 (35) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/package.json +1 -1
  3. package/react/Breadcrumbs/index.jsx +1 -0
  4. package/react/Buttons/Readme.md +0 -1
  5. package/react/CircleButton/index.jsx +1 -6
  6. package/react/ContactsListModal/MobileHeader.jsx +1 -1
  7. package/react/CozyDialogs/DialogBackButton.jsx +1 -0
  8. package/react/CozyDialogs/DialogCloseButton.jsx +1 -0
  9. package/react/FilePicker/FilePickerHeader.jsx +5 -1
  10. package/react/Icon/Readme.md +0 -1
  11. package/react/IconButton/index.jsx +1 -1
  12. package/react/Infos/index.jsx +6 -3
  13. package/react/InfosCarrousel/index.jsx +2 -0
  14. package/react/NestedSelect/Modal.jsx +1 -1
  15. package/react/SelectionBar/index.jsx +2 -0
  16. package/react/Viewer/Toolbar.jsx +1 -0
  17. package/react/Viewer/styles.styl +2 -2
  18. package/react/__snapshots__/examples.spec.jsx.snap +3 -3
  19. package/react/helpers/tracker.jsx +7 -21
  20. package/react/helpers/tracker.spec.js +0 -2
  21. package/react/hooks/useCycle.md +3 -3
  22. package/transpiled/react/Breadcrumbs/index.js +2 -1
  23. package/transpiled/react/CircleButton/index.js +0 -1
  24. package/transpiled/react/ContactsListModal/MobileHeader.js +2 -1
  25. package/transpiled/react/CozyDialogs/DialogBackButton.js +2 -1
  26. package/transpiled/react/CozyDialogs/DialogCloseButton.js +2 -1
  27. package/transpiled/react/FilePicker/FilePickerHeader.js +2 -1
  28. package/transpiled/react/IconButton/index.js +1 -1
  29. package/transpiled/react/Infos/index.js +2 -1
  30. package/transpiled/react/InfosCarrousel/index.js +4 -2
  31. package/transpiled/react/NestedSelect/Modal.js +1 -0
  32. package/transpiled/react/SelectionBar/index.js +2 -0
  33. package/transpiled/react/Viewer/Toolbar.js +1 -0
  34. package/transpiled/react/helpers/tracker.js +4 -22
  35. package/transpiled/react/stylesheet.css +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## [67.0.2](https://github.com/cozy/cozy-ui/compare/v67.0.1...v67.0.2) (2022-05-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Matomo tracking ([2156cde](https://github.com/cozy/cozy-ui/commit/2156cde))
7
+
8
+ ## [67.0.1](https://github.com/cozy/cozy-ui/compare/v67.0.0...v67.0.1) (2022-05-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **viewer:** Amiral displays PDF without enouggh margin-top ([875ebba](https://github.com/cozy/cozy-ui/commit/875ebba))
14
+
15
+ # [67.0.0](https://github.com/cozy/cozy-ui/compare/v66.2.4...v67.0.0) (2022-05-10)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * Set size of IconButton to `medium` because of previous BC ([56fc346](https://github.com/cozy/cozy-ui/commit/56fc346))
21
+
22
+
23
+ ### Features
24
+
25
+ * Set default size of IconButton to `large` ([c7d405a](https://github.com/cozy/cozy-ui/commit/c7d405a))
26
+
27
+
28
+ ### BREAKING CHANGES
29
+
30
+ * `IconButton`'s default props has been changed from `medium` to `large`. To keep the old behavior, you can use a codemods `transform-iconButton.js` to automatically handle this breaking change by setting `IconButton` size to `medium`. [See the codemods documentation](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-codemods). Using linter js auto-correction can be a good idea after that. Here a common example (don't forget to change `src` value): `jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-iconButton.js src --parser babel --extensions js,jsx && yarn lint:js --fix`
31
+
1
32
  ## [66.2.4](https://github.com/cozy/cozy-ui/compare/v66.2.3...v66.2.4) (2022-05-10)
2
33
 
3
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "66.2.4",
3
+ "version": "67.0.2",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -57,6 +57,7 @@ const Breadcrumbs = ({ items, className, style }) => {
57
57
  <IconButton
58
58
  onClick={lastPreviousItem.onClick}
59
59
  className={styles.Breadcrumb__previousButton}
60
+ size="medium"
60
61
  >
61
62
  <Icon icon={LeftIcon} />
62
63
  </IconButton>
@@ -72,7 +72,6 @@ import Paper from 'cozy-ui/transpiled/react/Paper'
72
72
  import CozyTheme from 'cozy-ui/transpiled/react/CozyTheme'
73
73
  import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus'
74
74
  import Icon from 'cozy-ui/transpiled/react/Icon'
75
- import IconButton from 'cozy-ui/transpiled/react/IconButton'
76
75
 
77
76
  const variants = ['primary', 'secondary', 'ghost', 'text']
78
77
  const iconPositions = ['startIcon', 'endIcon']
@@ -52,12 +52,7 @@ const CircleButton = ({
52
52
  flexBasis="64px"
53
53
  padding="8px 0 4px 0"
54
54
  >
55
- <IconButton
56
- className={styles.iconButton}
57
- size="large"
58
- disabled={disabled}
59
- {...props}
60
- >
55
+ <IconButton className={styles.iconButton} disabled={disabled} {...props}>
61
56
  {children}
62
57
  </IconButton>
63
58
  {label && (
@@ -20,7 +20,7 @@ const MobileHeader = ({ filter, placeholder, onChange, onDismiss }) => {
20
20
  className="u-flex u-flex-items-center u-pr-3 u-pl-half"
21
21
  style={barStyle}
22
22
  >
23
- <IconButton className="u-mr-half" onClick={onDismiss}>
23
+ <IconButton className="u-mr-half" onClick={onDismiss} size="medium">
24
24
  <Icon icon={PreviousIcon} />
25
25
  </IconButton>
26
26
  <Input
@@ -21,6 +21,7 @@ const DialogBackButton = ({ onClick, ...props }) => {
21
21
  {...props}
22
22
  aria-label={t('backButton')}
23
23
  className="dialogIconButton"
24
+ size="medium"
24
25
  >
25
26
  <Icon icon={PreviousIcon} />
26
27
  </IconButton>
@@ -20,6 +20,7 @@ const CloseButton = ({ onClick, ...props }) => {
20
20
  {...props}
21
21
  aria-label={t('closeButton')}
22
22
  className="dialogIconButton"
23
+ size="medium"
23
24
  >
24
25
  <Icon icon={CrossMediumIcon} />
25
26
  </IconButton>
@@ -63,7 +63,11 @@ const FilePickerHeader = ({ navigateTo, folderId, onClose }) => {
63
63
  return (
64
64
  <div className="u-flex u-flex-items-center">
65
65
  {isMobile && (
66
- <IconButton onClick={handleClick} className="u-p-0 u-pr-1">
66
+ <IconButton
67
+ onClick={handleClick}
68
+ className="u-p-0 u-pr-1"
69
+ size="medium"
70
+ >
67
71
  <Icon icon={Previous} />
68
72
  </IconButton>
69
73
  )}
@@ -22,7 +22,6 @@ import Album from 'cozy-ui/transpiled/react/Icons/Album'
22
22
  import Icon from 'cozy-ui/transpiled/react/Icon'
23
23
  import Typography from 'cozy-ui/transpiled/react/Typography'
24
24
  import Dialog from 'cozy-ui/transpiled/react/CozyDialogs/Dialog'
25
- import IconButton from 'cozy-ui/transpiled/react/IconButton'
26
25
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
27
26
  import { makeStyles } from '@material-ui/styles'
28
27
  import cx from 'classnames'
@@ -4,7 +4,7 @@ import cx from 'classnames'
4
4
  import MuiIconButton from '@material-ui/core/IconButton'
5
5
 
6
6
  const IconButton = forwardRef(
7
- ({ size = 'medium', className, children, ...props }, ref) => {
7
+ ({ size = 'large', className, children, ...props }, ref) => {
8
8
  return (
9
9
  <MuiIconButton ref={ref} className={cx(className, size)} {...props}>
10
10
  {children}
@@ -2,8 +2,7 @@ import React from 'react'
2
2
  import cx from 'classnames'
3
3
  import PropTypes from 'prop-types'
4
4
 
5
- import IconButton from '@material-ui/core/IconButton'
6
-
5
+ import IconButton from '../IconButton'
7
6
  import Icon from '../Icon'
8
7
  import Typography from '../Typography'
9
8
  import Stack from '../Stack'
@@ -31,7 +30,11 @@ export const Infos = ({
31
30
  </Stack>
32
31
  {dismissAction && (
33
32
  <div className={styles['Info-close']}>
34
- <IconButton onClick={dismissAction} {...dismissButtonProps}>
33
+ <IconButton
34
+ size="medium"
35
+ onClick={dismissAction}
36
+ {...dismissButtonProps}
37
+ >
35
38
  <Icon icon={CrossIcon} size="12" />
36
39
  </IconButton>
37
40
  </div>
@@ -68,6 +68,7 @@ const InfosCarrousel = ({
68
68
  <IconButton
69
69
  onClick={goToPreviousInfos}
70
70
  disabled={hasPreviousInfos}
71
+ size="medium"
71
72
  {...previousButtonProps}
72
73
  >
73
74
  <Icon icon={LeftIcon} />
@@ -76,6 +77,7 @@ const InfosCarrousel = ({
76
77
  <IconButton
77
78
  onClick={goToNextInfos}
78
79
  disabled={hasNextInfos}
80
+ size="medium"
79
81
  {...nextButtonProps}
80
82
  >
81
83
  <Icon icon={RightIcon} />
@@ -23,7 +23,7 @@ const NestedSelectDialogHeader = ({ onClickBack, showBack, title }) => {
23
23
  <Media>
24
24
  {showBack && (
25
25
  <Img className={styles.Modal__back}>
26
- <IconButton onClick={onClickBack}>
26
+ <IconButton size="medium" onClick={onClickBack}>
27
27
  <Icon icon={LeftIcon} />
28
28
  </IconButton>
29
29
  </Img>
@@ -130,6 +130,7 @@ const SelectionBar = ({ actions, selected, hideSelectionBar }) => {
130
130
  ? selectedCount < 1 // to avoid breaking change
131
131
  : actions[actionName].disabled(selected)
132
132
  }
133
+ size="medium"
133
134
  onClick={() => actions[actionName].action(selected)}
134
135
  >
135
136
  <Icon icon={actions[actionName].icon || actionName.toLowerCase()} />
@@ -143,6 +144,7 @@ const SelectionBar = ({ actions, selected, hideSelectionBar }) => {
143
144
  styles['SelectionBar-action--close']
144
145
  )}
145
146
  label={t('SelectionBar.close')}
147
+ size="medium"
146
148
  onClick={hideSelectionBar}
147
149
  >
148
150
  <Icon icon={CrossIcon} />
@@ -54,6 +54,7 @@ const Toolbar = ({
54
54
  >
55
55
  {onClose && (
56
56
  <IconButton
57
+ size="medium"
57
58
  onClick={onClose}
58
59
  className={cx(classes.iconButton, { 'u-white': isDesktop })}
59
60
  >
@@ -103,8 +103,8 @@ $viewerMarginTopMedium = $toolbarHeightMedium - $footerHeight
103
103
 
104
104
  .viewer-pdfMobile
105
105
  width 100%
106
- height 'calc(100% - %s)' % $viewerHeightMedium
107
- margin-top $viewerMarginTopMedium
106
+ height 'calc(100% - %s - var(--flagship-top-height))' % $viewerHeightMedium
107
+ margin-top 'calc(var(--flagship-top-height) + %s)' % $viewerMarginTopMedium
108
108
 
109
109
  &--image
110
110
  width 100%
@@ -7412,7 +7412,7 @@ exports[`Infos should render examples: Infos 1`] = `
7412
7412
  </div>
7413
7413
  <div><button type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--center___16_Xh\\"><span><span>one</span></span></button><button type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--center___16_Xh\\"><span><span>two</span></span></button><button type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--center___16_Xh\\"><span><span>three</span></span></button></div>
7414
7414
  </div>
7415
- <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7415
+ <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root medium\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7416
7416
  </div>
7417
7417
  </div>
7418
7418
  </div>"
@@ -7435,7 +7435,7 @@ exports[`InfosCarrousel should render examples: InfosCarrousel 1`] = `
7435
7435
  </div>
7436
7436
  <div><button type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--secondary___3Br_N styles__c-btn--center___16_Xh\\"><span><span>A CTA button</span></span></button></div>
7437
7437
  </div>
7438
- <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7438
+ <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root medium\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7439
7439
  </div>
7440
7440
  </div>
7441
7441
  <div style=\\"width: 100%; flex-shrink: 0; overflow: auto; overflow-y: hidden;\\" aria-hidden=\\"true\\" data-swipeable=\\"true\\">
@@ -7449,7 +7449,7 @@ exports[`InfosCarrousel should render examples: InfosCarrousel 1`] = `
7449
7449
  </div>
7450
7450
  <div><button type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--secondary___3Br_N styles__c-btn--center___16_Xh\\"><span><span>A CTA button</span></span></button></div>
7451
7451
  </div>
7452
- <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7452
+ <div class=\\"styles__Info-close___1RVQP\\"><button class=\\"MuiButtonBase-root MuiIconButton-root medium\\" tabindex=\\"0\\" type=\\"button\\"><span class=\\"MuiIconButton-label\\"><svg viewBox=\\"0 0 24 24\\" class=\\"styles__icon___23x3R\\" width=\\"12\\" height=\\"12\\"><path fill-rule=\\"evenodd\\" d=\\"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z\\"></path></svg></span></button></div>
7453
7453
  </div>
7454
7454
  </div>
7455
7455
  </div>
@@ -81,40 +81,26 @@ export const configureTracker = (options = {}) => {
81
81
  }
82
82
 
83
83
  let appName
84
- let cozyDomain
85
- let userIdFromCozyDomain
86
84
 
87
85
  const root = document.querySelector('[role=application]')
88
86
 
89
87
  if (root && root.dataset) {
90
- appName = readCozyDataFromDOM('appName')
91
- cozyDomain = readCozyDataFromDOM('cozyDomain')
88
+ appName = readCozyDataFromDOM('appName') || readCozyDataFromDOM('app').name
92
89
  }
93
-
94
- if (cozyDomain) {
95
- userIdFromCozyDomain = cozyDomain
96
- let indexOfPort = cozyDomain.indexOf(':')
97
- if (indexOfPort >= 0) {
98
- userIdFromCozyDomain = userIdFromCozyDomain.substring(0, indexOfPort)
99
- }
100
- }
101
-
102
90
  // merge default options with what has been provided
103
- const { heartbeat, userId, app, appDimensionId } = Object.assign(
91
+ const { app, appDimensionId } = Object.assign(
104
92
  {
105
- userId: userIdFromCozyDomain,
106
93
  appDimensionId: __PIWIK_DIMENSION_ID_APP__,
107
- app: appName,
108
- heartbeat: 15
94
+ app: appName
109
95
  },
110
96
  options
111
97
  )
112
98
 
113
- // apply them
114
- if (parseInt(heartbeat) > 0)
115
- trackerInstance.push(['enableHeartBeatTimer', parseInt(heartbeat, 10)])
116
- trackerInstance.push(['setUserId', userId])
117
99
  trackerInstance.push(['setCustomDimension', appDimensionId, app])
100
+ trackerInstance.push([
101
+ 'setCustomUrl',
102
+ window.location.pathname.substr(1) + location.search
103
+ ])
118
104
  }
119
105
 
120
106
  /**
@@ -57,8 +57,6 @@ describe('configureTracker', () => {
57
57
  )}' />`
58
58
 
59
59
  trackerFile.configureTracker({ app: 'banks2' })
60
- expect(tracker.push).toHaveBeenCalledWith(['enableHeartBeatTimer', 15])
61
- expect(tracker.push).toHaveBeenCalledWith(['setUserId', 'cozy.tools'])
62
60
  expect(tracker.push).toHaveBeenCalledWith([
63
61
  'setCustomDimension',
64
62
  1234,
@@ -1,6 +1,6 @@
1
1
  Used when you want a cyclical variable, for example for a carousel.
2
2
 
3
- ```
3
+ ```jsx
4
4
  import IconButton from '@material-ui/core/IconButton'
5
5
  import Typography from '@material-ui/core/Typography'
6
6
  import Icon from 'cozy-ui/transpiled/react/Icon'
@@ -13,13 +13,13 @@ const Component = () => {
13
13
  const [index, setPrev, setNext] = useCycle(2, 0, arr.length - 1)
14
14
 
15
15
  return <div className='u-flex u-flex-items-center'>
16
- <IconButton onClick={setPrev}><Icon icon={LeftIcon} /></IconButton>
16
+ <IconButton onClick={setPrev} size="medium"><Icon icon={LeftIcon} /></IconButton>
17
17
  <Typography variant='body1'>
18
18
  {arr.map((item, i) => {
19
19
  return index === i ? '●' : '○'
20
20
  })}
21
21
  </Typography>
22
- <IconButton onClick={setNext}><Icon icon={RightIcon} /></IconButton>
22
+ <IconButton onClick={setNext} size="medium"><Icon icon={RightIcon} /></IconButton>
23
23
  </div>
24
24
  };
25
25
 
@@ -76,7 +76,8 @@ var Breadcrumbs = function Breadcrumbs(_ref2) {
76
76
  className: cx(styles.Breadcrumb, className)
77
77
  }, items.length > 1 && /*#__PURE__*/React.createElement(IconButton, {
78
78
  onClick: lastPreviousItem.onClick,
79
- className: styles.Breadcrumb__previousButton
79
+ className: styles.Breadcrumb__previousButton,
80
+ size: "medium"
80
81
  }, /*#__PURE__*/React.createElement(Icon, {
81
82
  icon: LeftIcon
82
83
  })), /*#__PURE__*/React.createElement("div", {
@@ -82,7 +82,6 @@ var CircleButton = function CircleButton(_ref7) {
82
82
  padding: "8px 0 4px 0"
83
83
  }, /*#__PURE__*/React.createElement(IconButton, _extends({
84
84
  className: styles.iconButton,
85
- size: "large",
86
85
  disabled: disabled
87
86
  }, props), children), label && /*#__PURE__*/React.createElement(Typography, {
88
87
  component: "div",
@@ -23,7 +23,8 @@ var MobileHeader = function MobileHeader(_ref) {
23
23
  style: barStyle
24
24
  }, /*#__PURE__*/React.createElement(IconButton, {
25
25
  className: "u-mr-half",
26
- onClick: onDismiss
26
+ onClick: onDismiss,
27
+ size: "medium"
27
28
  }, /*#__PURE__*/React.createElement(Icon, {
28
29
  icon: PreviousIcon
29
30
  })), /*#__PURE__*/React.createElement(Input, {
@@ -27,7 +27,8 @@ var DialogBackButton = function DialogBackButton(_ref) {
27
27
  onClick: onClick
28
28
  }, props, {
29
29
  "aria-label": t('backButton'),
30
- className: "dialogIconButton"
30
+ className: "dialogIconButton",
31
+ size: "medium"
31
32
  }), /*#__PURE__*/React.createElement(Icon, {
32
33
  icon: PreviousIcon
33
34
  })));
@@ -27,7 +27,8 @@ var CloseButton = function CloseButton(_ref) {
27
27
  onClick: onClick
28
28
  }, props, {
29
29
  "aria-label": t('closeButton'),
30
- className: "dialogIconButton"
30
+ className: "dialogIconButton",
31
+ size: "medium"
31
32
  }), /*#__PURE__*/React.createElement(Icon, {
32
33
  icon: CrossMediumIcon
33
34
  })));
@@ -61,7 +61,8 @@ var FilePickerHeader = function FilePickerHeader(_ref2) {
61
61
  className: "u-flex u-flex-items-center"
62
62
  }, isMobile && /*#__PURE__*/React.createElement(IconButton, {
63
63
  onClick: handleClick,
64
- className: "u-p-0 u-pr-1"
64
+ className: "u-p-0 u-pr-1",
65
+ size: "medium"
65
66
  }, /*#__PURE__*/React.createElement(Icon, {
66
67
  icon: Previous
67
68
  })), /*#__PURE__*/React.createElement(FilePickerBreadcrumb, {
@@ -7,7 +7,7 @@ import cx from 'classnames';
7
7
  import MuiIconButton from '@material-ui/core/IconButton';
8
8
  var IconButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
9
9
  var _ref$size = _ref.size,
10
- size = _ref$size === void 0 ? 'medium' : _ref$size,
10
+ size = _ref$size === void 0 ? 'large' : _ref$size,
11
11
  className = _ref.className,
12
12
  children = _ref.children,
13
13
  props = _objectWithoutProperties(_ref, _excluded);
@@ -5,7 +5,7 @@ var _excluded = ["title", "text", "icon", "actionButton", "isImportant"];
5
5
  import React from 'react';
6
6
  import cx from 'classnames';
7
7
  import PropTypes from 'prop-types';
8
- import IconButton from '@material-ui/core/IconButton';
8
+ import IconButton from "cozy-ui/transpiled/react/IconButton";
9
9
  import Icon from "cozy-ui/transpiled/react/Icon";
10
10
  import Typography from "cozy-ui/transpiled/react/Typography";
11
11
  import Stack from "cozy-ui/transpiled/react/Stack";
@@ -39,6 +39,7 @@ export var Infos = function Infos(_ref) {
39
39
  }, description)), action && /*#__PURE__*/React.createElement("div", null, action)), dismissAction && /*#__PURE__*/React.createElement("div", {
40
40
  className: styles['Info-close']
41
41
  }, /*#__PURE__*/React.createElement(IconButton, _extends({
42
+ size: "medium",
42
43
  onClick: dismissAction
43
44
  }, dismissButtonProps), /*#__PURE__*/React.createElement(Icon, {
44
45
  icon: CrossIcon,
@@ -82,14 +82,16 @@ var InfosCarrousel = function InfosCarrousel(_ref) {
82
82
  className: styles['InfosCarrousel-navigation']
83
83
  }, /*#__PURE__*/React.createElement(IconButton, _extends({
84
84
  onClick: goToPreviousInfos,
85
- disabled: hasPreviousInfos
85
+ disabled: hasPreviousInfos,
86
+ size: "medium"
86
87
  }, previousButtonProps), /*#__PURE__*/React.createElement(Icon, {
87
88
  icon: LeftIcon
88
89
  })), /*#__PURE__*/React.createElement("span", {
89
90
  className: styles['InfosCarrousel-separator']
90
91
  }), /*#__PURE__*/React.createElement(IconButton, _extends({
91
92
  onClick: goToNextInfos,
92
- disabled: hasNextInfos
93
+ disabled: hasNextInfos,
94
+ size: "medium"
93
95
  }, nextButtonProps), /*#__PURE__*/React.createElement(Icon, {
94
96
  icon: RightIcon
95
97
  }))) : null);
@@ -24,6 +24,7 @@ var NestedSelectDialogHeader = function NestedSelectDialogHeader(_ref) {
24
24
  return /*#__PURE__*/React.createElement(DialogTitle, dialogTitleProps, /*#__PURE__*/React.createElement(Media, null, showBack && /*#__PURE__*/React.createElement(Img, {
25
25
  className: styles.Modal__back
26
26
  }, /*#__PURE__*/React.createElement(IconButton, {
27
+ size: "medium",
27
28
  onClick: onClickBack
28
29
  }, /*#__PURE__*/React.createElement(Icon, {
29
30
  icon: LeftIcon
@@ -107,6 +107,7 @@ var SelectionBar = function SelectionBar(_ref) {
107
107
  key: index,
108
108
  disabled: actions[actionName].disabled === undefined ? selectedCount < 1 // to avoid breaking change
109
109
  : actions[actionName].disabled(selected),
110
+ size: "medium",
110
111
  onClick: function onClick() {
111
112
  return actions[actionName].action(selected);
112
113
  }
@@ -117,6 +118,7 @@ var SelectionBar = function SelectionBar(_ref) {
117
118
  "data-testid": "selectionBar-action-close",
118
119
  className: cx(styles['SelectionBar-action'], styles['SelectionBar-action--close']),
119
120
  label: t('SelectionBar.close'),
121
+ size: "medium",
120
122
  onClick: hideSelectionBar
121
123
  }, /*#__PURE__*/React.createElement(Icon, {
122
124
  icon: CrossIcon
@@ -75,6 +75,7 @@ var Toolbar = function Toolbar(_ref) {
75
75
  onMouseEnter: onMouseEnter,
76
76
  onMouseLeave: onMouseLeave
77
77
  }, onClose && /*#__PURE__*/React.createElement(IconButton, {
78
+ size: "medium",
78
79
  onClick: onClose,
79
80
  className: cx(classes.iconButton, {
80
81
  'u-white': isDesktop
@@ -80,40 +80,22 @@ export var configureTracker = function configureTracker() {
80
80
  }
81
81
 
82
82
  var appName;
83
- var cozyDomain;
84
- var userIdFromCozyDomain;
85
83
  var root = document.querySelector('[role=application]');
86
84
 
87
85
  if (root && root.dataset) {
88
- appName = readCozyDataFromDOM('appName');
89
- cozyDomain = readCozyDataFromDOM('cozyDomain');
90
- }
91
-
92
- if (cozyDomain) {
93
- userIdFromCozyDomain = cozyDomain;
94
- var indexOfPort = cozyDomain.indexOf(':');
95
-
96
- if (indexOfPort >= 0) {
97
- userIdFromCozyDomain = userIdFromCozyDomain.substring(0, indexOfPort);
98
- }
86
+ appName = readCozyDataFromDOM('appName') || readCozyDataFromDOM('app').name;
99
87
  } // merge default options with what has been provided
100
88
 
101
89
 
102
90
  var _Object$assign = Object.assign({
103
- userId: userIdFromCozyDomain,
104
91
  appDimensionId: __PIWIK_DIMENSION_ID_APP__,
105
- app: appName,
106
- heartbeat: 15
92
+ app: appName
107
93
  }, options),
108
- heartbeat = _Object$assign.heartbeat,
109
- userId = _Object$assign.userId,
110
94
  app = _Object$assign.app,
111
- appDimensionId = _Object$assign.appDimensionId; // apply them
112
-
95
+ appDimensionId = _Object$assign.appDimensionId;
113
96
 
114
- if (parseInt(heartbeat) > 0) trackerInstance.push(['enableHeartBeatTimer', parseInt(heartbeat, 10)]);
115
- trackerInstance.push(['setUserId', userId]);
116
97
  trackerInstance.push(['setCustomDimension', appDimensionId, app]);
98
+ trackerInstance.push(['setCustomUrl', window.location.pathname.substr(1) + location.search]);
117
99
  };
118
100
  /**
119
101
  * Returns a redux middleware which tracks events if the action