cozy-sharing 15.0.2 → 15.0.4

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.
@@ -1,4 +1,6 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import React from 'react';
3
+ import Button from 'cozy-ui/transpiled/react/Buttons';
2
4
  import { AvatarList } from './AvatarList';
3
5
  import { recipients } from '../../../.storybook/fixtures/recipients';
4
6
  var meta = {
@@ -8,12 +10,23 @@ var meta = {
8
10
  }
9
11
  };
10
12
  export default meta;
13
+
14
+ var AvatarListWithButton = function AvatarListWithButton(args) {
15
+ return /*#__PURE__*/React.createElement("div", {
16
+ className: "u-flex"
17
+ }, /*#__PURE__*/React.createElement(AvatarList, args), /*#__PURE__*/React.createElement(Button, {
18
+ label: "Add"
19
+ }));
20
+ };
21
+
11
22
  export var Default = {
12
23
  name: 'Default',
24
+ render: AvatarListWithButton,
13
25
  args: {}
14
26
  };
15
27
  export var WithGroups = {
16
28
  name: 'With groups',
29
+ render: AvatarListWithButton,
17
30
  args: {
18
31
  recipients: [].concat(_toConsumableArray(recipients), [{
19
32
  name: 'Group 1',
@@ -23,4 +36,11 @@ export var WithGroups = {
23
36
  }]
24
37
  }])
25
38
  }
39
+ };
40
+ export var WithLink = {
41
+ name: 'With link',
42
+ render: AvatarListWithButton,
43
+ args: {
44
+ link: {}
45
+ }
26
46
  };
@@ -76,6 +76,5 @@
76
76
  svg
77
77
  fill: var(--genericRecipientColor)
78
78
 
79
- &--plusX,
80
- &--avatar
81
- margin-right -0.6rem
79
+ & > *:not(:first-child)
80
+ margin-right -0.6rem
@@ -167,8 +167,7 @@
167
167
  .recipient__recipients-avatars--link___1qeON svg {
168
168
  fill: var(--genericRecipientColor);
169
169
  }
170
- .recipient__recipients-avatars--plusX___3-6_l,
171
- .recipient__recipients-avatars--avatar___-owjC {
170
+ .recipient__recipients-avatars___1npjD > *:not(:first-child) {
172
171
  margin-right: -0.6rem;
173
172
  }
174
173
  /* imported from CozyPassFingerprintDialogContent.styl */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "15.0.2",
3
+ "version": "15.0.4",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@cozy/minilog": "^1.0.0",
32
32
  "classnames": "^2.2.6",
33
- "cozy-device-helper": "^3.0.0",
33
+ "cozy-device-helper": "^3.1.0",
34
34
  "cozy-doctypes": "^1.91.1",
35
35
  "lodash": "^4.17.19",
36
36
  "react-autosuggest": "^10.1.0",
@@ -71,5 +71,5 @@
71
71
  "sideEffects": [
72
72
  "*.css"
73
73
  ],
74
- "gitHead": "6888e663ad609a22b4c522d9f465afd48021b732"
74
+ "gitHead": "a5ed529e509f2a73b5eefa5b9260745fa2095ad6"
75
75
  }
@@ -1,3 +1,7 @@
1
+ import React from 'react'
2
+
3
+ import Button from 'cozy-ui/transpiled/react/Buttons'
4
+
1
5
  import { AvatarList } from './AvatarList'
2
6
  import { recipients } from '../../../.storybook/fixtures/recipients'
3
7
 
@@ -10,13 +14,24 @@ const meta = {
10
14
 
11
15
  export default meta
12
16
 
17
+ const AvatarListWithButton = args => {
18
+ return (
19
+ <div className="u-flex">
20
+ <AvatarList {...args} />
21
+ <Button label="Add" />
22
+ </div>
23
+ )
24
+ }
25
+
13
26
  export const Default = {
14
27
  name: 'Default',
28
+ render: AvatarListWithButton,
15
29
  args: {}
16
30
  }
17
31
 
18
32
  export const WithGroups = {
19
33
  name: 'With groups',
34
+ render: AvatarListWithButton,
20
35
  args: {
21
36
  recipients: [
22
37
  ...recipients,
@@ -32,3 +47,11 @@ export const WithGroups = {
32
47
  ]
33
48
  }
34
49
  }
50
+
51
+ export const WithLink = {
52
+ name: 'With link',
53
+ render: AvatarListWithButton,
54
+ args: {
55
+ link: {}
56
+ }
57
+ }
@@ -76,6 +76,5 @@
76
76
  svg
77
77
  fill: var(--genericRecipientColor)
78
78
 
79
- &--plusX,
80
- &--avatar
81
- margin-right -0.6rem
79
+ & > *:not(:first-child)
80
+ margin-right -0.6rem