cozy-ui 60.6.1 → 60.8.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [60.8.2](https://github.com/cozy/cozy-ui/compare/v60.8.1...v60.8.2) (2022-01-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Auto ref on BottomSheet Header now use displayName too ([0f1e067](https://github.com/cozy/cozy-ui/commit/0f1e067))
7
+
8
+ ## [60.8.1](https://github.com/cozy/cozy-ui/compare/v60.8.0...v60.8.1) (2022-01-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * PreventDefault on cozy-intent event ([f0ad95b](https://github.com/cozy/cozy-ui/commit/f0ad95b))
14
+
15
+ # [60.8.0](https://github.com/cozy/cozy-ui/compare/v60.7.0...v60.8.0) (2022-01-25)
16
+
17
+
18
+ ### Features
19
+
20
+ * Add PhoneUpload icon ([d88c4ba](https://github.com/cozy/cozy-ui/commit/d88c4ba))
21
+
22
+ # [60.7.0](https://github.com/cozy/cozy-ui/compare/v60.6.1...v60.7.0) (2022-01-25)
23
+
24
+
25
+ ### Features
26
+
27
+ * Add FolderMoveto icon ([7d68e72](https://github.com/cozy/cozy-ui/commit/7d68e72))
28
+
1
29
  ## [60.6.1](https://github.com/cozy/cozy-ui/compare/v60.6.0...v60.6.1) (2022-01-24)
2
30
 
3
31
 
@@ -0,0 +1 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M5.509 1c.271 0 .648.157.84.348l1.303 1.304c.192.192.579.348.848.348h6.503c.55 0 .997.456.997 1.002v8.99A2.003 2.003 0 0 1 14.006 15H1.994A2 2 0 0 1 0 12.994V2.007C0 1.45.451 1 .99 1h4.52ZM11.5 6a1 1 0 0 0-1.497 1.32l.083.094.5.586H6a1 1 0 0 0-.117 1.993L6 10h4.586l-.5.586a1 1 0 0 0 1.32 1.497L11.5 12l2.207-2.293a1 1 0 0 0 .083-1.32l-.083-.094L11.5 6Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M12.998 0A1 1 0 0 1 14 1v14c0 .552-.456 1-1.002 1H3.002A1 1 0 0 1 2 15V1c0-.552.456-1 1.002-1h9.995ZM12 2H4v11h8V2ZM7.293 3.293a1 1 0 0 1 1.32-.083l.094.083 2 2a1 1 0 0 1-1.32 1.497l-.094-.083L9 6.414V11a1 1 0 0 1-1.993.117L7 11V6.414l-.293.293a1 1 0 0 1-1.497-1.32l.083-.094 2-2Z"/></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "60.6.1",
3
+ "version": "60.8.2",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -85,7 +85,10 @@ export class AppLinker extends React.Component {
85
85
 
86
86
  if (context) {
87
87
  return {
88
- onClick: () => context.call('openApp', href, app),
88
+ onClick: event => {
89
+ event.preventDefault()
90
+ context.call('openApp', href, app)
91
+ },
89
92
  href: '#'
90
93
  }
91
94
  }
@@ -120,7 +120,10 @@ const BottomSheet = ({ toolbarProps, settings, children }) => {
120
120
  }
121
121
 
122
122
  const overriddenChildren = React.Children.map(children, child => {
123
- if (child.type.name === 'BottomSheetHeader') {
123
+ if (
124
+ child.type.name === 'BottomSheetHeader' ||
125
+ child.type.displayName === 'BottomSheetHeader'
126
+ ) {
124
127
  return React.cloneElement(child, { headerContentRef })
125
128
  }
126
129
  return child
@@ -176,9 +179,9 @@ BottomSheet.propTypes = {
176
179
  /** Toolbar properties */
177
180
  toolbarProps: PropTypes.shape({
178
181
  /** React reference of the toolbar node */
179
- ref: PropTypes.bool,
182
+ ref: PropTypes.object,
180
183
  /** Toolbar height value */
181
- height: PropTypes.func
184
+ height: PropTypes.number
182
185
  }),
183
186
  /** Settings that can be modified */
184
187
  settings: PropTypes.shape({
@@ -120,6 +120,7 @@ import FlashAuto from 'cozy-ui/transpiled/react/Icons/FlashAuto'
120
120
  import Flashlight from 'cozy-ui/transpiled/react/Icons/Flashlight'
121
121
  import Folder from 'cozy-ui/transpiled/react/Icons/Folder'
122
122
  import FolderAdd from 'cozy-ui/transpiled/react/Icons/FolderAdd'
123
+ import FolderMoveto from 'cozy-ui/transpiled/react/Icons/FolderMoveto'
123
124
  import Forbidden from 'cozy-ui/transpiled/react/Icons/Forbidden'
124
125
  import FromUser from 'cozy-ui/transpiled/react/Icons/FromUser'
125
126
  import Gear from 'cozy-ui/transpiled/react/Icons/Gear'
@@ -174,6 +175,7 @@ import PercentCircle from 'cozy-ui/transpiled/react/Icons/PercentCircle'
174
175
  import PersonalData from 'cozy-ui/transpiled/react/Icons/PersonalData'
175
176
  import Phone from 'cozy-ui/transpiled/react/Icons/Phone'
176
177
  import PhoneDownload from 'cozy-ui/transpiled/react/Icons/PhoneDownload'
178
+ import PhoneUpload from 'cozy-ui/transpiled/react/Icons/PhoneUpload'
177
179
  import PieChart from 'cozy-ui/transpiled/react/Icons/PieChart'
178
180
  import Pin from 'cozy-ui/transpiled/react/Icons/Pin'
179
181
  import Plane from 'cozy-ui/transpiled/react/Icons/Plane'
@@ -328,6 +330,7 @@ const icons = [
328
330
  Flashlight,
329
331
  Folder,
330
332
  FolderAdd,
333
+ FolderMoveto,
331
334
  Forbidden,
332
335
  FromUser,
333
336
  Gear,
@@ -382,6 +385,7 @@ const icons = [
382
385
  PersonalData,
383
386
  Phone,
384
387
  PhoneDownload,
388
+ PhoneUpload,
385
389
  PieChart,
386
390
  Pin,
387
391
  Plane,
@@ -698,7 +702,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
698
702
 
699
703
  const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
700
704
  let i = 0
701
- const availableIcons = ['album-add','album-remove','album','answer','apple','archive','attachment','attention','bank','banking-add','banking','bell','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','categories','certified','check-circle','check-list','check-square','check','checkbox','circle-filled','clock','cloud-happy','cloud','collect','comment','company','compass','connector','contract','contrast','cozy-laugh','cozy-text','credit-card-add','credit-card','credit','crop','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','debit','devices','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','email-notification','email','eu','euro','exchange','eye-closed','eye','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder','forbidden','from-user','gear','globe','graph-circle','grid','group-list','groups','heart','help','history','home','hourglass','image','info-outlined','info','key','laptop','left','lightbulb','link-out','link','list','location','lock','logout','magic-trick','magnet','magnifier','merge','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','offline','online','openwith','palette','paperplane','password','pen','people','percent-circle','percent','personal-data','phone-download','phone','pie-chart','pin','plane','plus-small','plus','previous','printer','qualify','radio-checked','radio-unchecked','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','select-all','setting','share-circle','share','shield','shop','sound','spinner','stack','star','stats','subway','sync-cozy','sync','target','team','telephone','to-the-cloud','top','train','trash','trophy','unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','wrench-circle']
705
+ const availableIcons = ['album-add','album-remove','album','answer','apple','archive','attachment','attention','bank','banking-add','banking','bell','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','categories','certified','check-circle','check-list','check-square','check','checkbox','circle-filled','clock','cloud-happy','cloud','collect','comment','company','compass','connector','contract','contrast','cozy-laugh','cozy-text','credit-card-add','credit-card','credit','crop','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','debit','devices','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','email-notification','email','eu','euro','exchange','eye-closed','eye','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder-moveto','folder','forbidden','from-user','gear','globe','graph-circle','grid','group-list','groups','heart','help','history','home','hourglass','image','info-outlined','info','key','laptop','left','lightbulb','link-out','link','list','location','lock','logout','magic-trick','magnet','magnifier','merge','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','offline','online','openwith','palette','paperplane','password','pen','people','percent-circle','percent','personal-data','phone-download','phone-upload','phone','pie-chart','pin','plane','plus-small','plus','previous','printer','qualify','radio-checked','radio-unchecked','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','select-all','setting','share-circle','share','shield','shop','sound','spinner','stack','star','stats','subway','sync-cozy','sync','target','team','telephone','to-the-cloud','top','train','trash','trophy','unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','wrench-circle']
702
706
  ;
703
707
  <div style={{ fontSize: '2rem', display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)' }}>
704
708
  <Sprite />
@@ -317,7 +317,7 @@ module.exports = `<svg><defs>
317
317
  <path fill-rule="evenodd" d="M6 7.003L3 3h10l-3 4.003H6zM13 2H3V0h10v2zM6 16V7h4v9H6z"/>
318
318
  </symbol><symbol id="folder-add" viewBox="0 0 16 16">
319
319
  <path fill-rule="evenodd" d="M0 2.007C0 1.45.451 1 .99 1H5.51c.271 0 .648.157.84.348l1.303 1.304c.192.192.579.348.848.348h6.503c.55 0 .997.456.997 1.002v8.99C16 14.1 15.105 15 14.006 15H1.994A2 2 0 0 1 0 12.994V2.007zM9 5v3H6v2h3v3h2v-3h3V8h-3V5H9z"/>
320
- </symbol><symbol id="folder" viewBox="0 0 16 16">
320
+ </symbol><symbol id="folder-moveto" viewBox="0 0 16 16"><path clip-rule="evenodd" d="M5.509 1c.271 0 .648.157.84.348l1.303 1.304c.192.192.579.348.848.348h6.503c.55 0 .997.456.997 1.002v8.99A2.003 2.003 0 0 1 14.006 15H1.994A2 2 0 0 1 0 12.994V2.007C0 1.45.451 1 .99 1h4.52ZM11.5 6a1 1 0 0 0-1.497 1.32l.083.094.5.586H6a1 1 0 0 0-.117 1.993L6 10h4.586l-.5.586a1 1 0 0 0 1.32 1.497L11.5 12l2.207-2.293a1 1 0 0 0 .083-1.32l-.083-.094L11.5 6Z"/></symbol><symbol id="folder" viewBox="0 0 16 16">
321
321
  <g fill-rule="evenodd" transform="translate(-32 -32)">
322
322
  <path d="M32,34.0068455 C32,33.4507801 32.4509752,33 32.990778,33 L37.5089948,33 C37.7801695,33 38.1569366,33.1569366 38.3483734,33.3483734 L39.6516266,34.6516266 C39.8440279,34.8440279 40.2307968,35 40.5004358,35 L47.0029699,35 C47.5536144,35 48,35.455761 48,36.0024733 L48,44.9914698 C48,46.1007504 47.1054862,47 46.0059397,47 L33.9940603,47 C32.8927712,47 32,46.1029399 32,44.9941413 L32,34.0068455 Z M32,37 L48,37 L48,38 L32,38 L32,37 Z"/>
323
323
  <path d="M32,34.0068455 C32,33.4507801 32.4509752,33 32.990778,33 L37.5089948,33 C37.7801695,33 38.1569366,33.1569366 38.3483734,33.3483734 L39.6516266,34.6516266 C39.8440279,34.8440279 40.2307968,35 40.5004358,35 L47.0029699,35 C47.5536144,35 48,35.455761 48,36.0024733 L48,44.9914698 C48,46.1007504 47.1054862,47 46.0059397,47 L33.9940603,47 C32.8927712,47 32,46.1029399 32,44.9941413 L32,34.0068455 Z M32,37 L48,37 L48,38 L32,38 L32,37 Z"/>
@@ -445,7 +445,7 @@ module.exports = `<svg><defs>
445
445
  </g>
446
446
  </symbol><symbol id="phone" viewBox="0 0 16 16">
447
447
  <path fill-rule="evenodd" d="M2 1c0-.552.456-1 1.002-1h9.996A1 1 0 0 1 14 1v14c0 .552-.456 1-1.002 1H3.002A1 1 0 0 1 2 15V1zm2 1v10h8V2H4zm4 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/>
448
- </symbol><symbol id="pie-chart" viewBox="0 0 16 16">
448
+ </symbol><symbol id="phone-upload" viewBox="0 0 16 16"><path clip-rule="evenodd" d="M12.998 0A1 1 0 0 1 14 1v14c0 .552-.456 1-1.002 1H3.002A1 1 0 0 1 2 15V1c0-.552.456-1 1.002-1h9.995ZM12 2H4v11h8V2ZM7.293 3.293a1 1 0 0 1 1.32-.083l.094.083 2 2a1 1 0 0 1-1.32 1.497l-.094-.083L9 6.414V11a1 1 0 0 1-1.993.117L7 11V6.414l-.293.293a1 1 0 0 1-1.497-1.32l.083-.094 2-2Z"/></symbol><symbol id="pie-chart" viewBox="0 0 16 16">
449
449
  <path fill-rule="evenodd" d="M7 16A7 7 0 0 1 7 2v7h7a7 7 0 0 1-7 7zm2-9V0a7 7 0 0 1 7 7H9z"/>
450
450
  </symbol><symbol id="pin" viewBox="0 0 16 16">
451
451
  <path fill-rule="evenodd" d="M4 1c0-.552.453-1 .997-1h6.006c.55 0 .997.444.997 1 0 .552-.453 1-.997 1H11v4l2 2v2H9v4l-2 2v-6H3V8l2-2V2c-.552 0-1-.444-1-1z"/>
@@ -0,0 +1,15 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/folder-moveto.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgFolderMoveto(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 16" {...props}>
7
+ <path
8
+ clipRule="evenodd"
9
+ d="M5.509 1c.271 0 .648.157.84.348l1.303 1.304c.192.192.579.348.848.348h6.503c.55 0 .997.456.997 1.002v8.99A2.003 2.003 0 0114.006 15H1.994A2 2 0 010 12.994V2.007C0 1.45.451 1 .99 1h4.52zM11.5 6a1 1 0 00-1.497 1.32l.083.094.5.586H6a1 1 0 00-.117 1.993L6 10h4.586l-.5.586a1 1 0 001.32 1.497L11.5 12l2.207-2.293a1 1 0 00.083-1.32l-.083-.094L11.5 6z"
10
+ />
11
+ </svg>
12
+ )
13
+ }
14
+
15
+ export default SvgFolderMoveto
@@ -0,0 +1,15 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/phone-upload.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgPhoneUpload(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 16" {...props}>
7
+ <path
8
+ clipRule="evenodd"
9
+ d="M12.998 0A1 1 0 0114 1v14c0 .552-.456 1-1.002 1H3.002A1 1 0 012 15V1c0-.552.456-1 1.002-1h9.995zM12 2H4v11h8V2zM7.293 3.293a1 1 0 011.32-.083l.094.083 2 2a1 1 0 01-1.32 1.497l-.094-.083L9 6.414V11a1 1 0 01-1.993.117L7 11V6.414l-.293.293a1 1 0 01-1.497-1.32l.083-.094 2-2z"
10
+ />
11
+ </svg>
12
+ )
13
+ }
14
+
15
+ export default SvgPhoneUpload