@box/collaboration-popover 1.60.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 (77) hide show
  1. package/LICENSE +379 -0
  2. package/README.md +57 -0
  3. package/dist/chunks/collaboration-popover.module.js +16 -0
  4. package/dist/chunks/user-info-footer.js +29 -0
  5. package/dist/esm/index.js +6 -0
  6. package/dist/esm/lib/collaboration-popover.js +60 -0
  7. package/dist/esm/lib/components/user-avatar.js +25 -0
  8. package/dist/esm/lib/components/user-details.js +56 -0
  9. package/dist/esm/lib/components/user-info-footer.js +2 -0
  10. package/dist/esm/lib/components/user-invite-dropdown.js +47 -0
  11. package/dist/esm/lib/messages.js +48 -0
  12. package/dist/esm/lib/utils/getInitials.js +2 -0
  13. package/dist/i18n/bn-IN.js +13 -0
  14. package/dist/i18n/bn-IN.properties +22 -0
  15. package/dist/i18n/da-DK.js +13 -0
  16. package/dist/i18n/da-DK.properties +22 -0
  17. package/dist/i18n/de-DE.js +13 -0
  18. package/dist/i18n/de-DE.properties +22 -0
  19. package/dist/i18n/en-AU.js +13 -0
  20. package/dist/i18n/en-AU.properties +22 -0
  21. package/dist/i18n/en-CA.js +13 -0
  22. package/dist/i18n/en-CA.properties +22 -0
  23. package/dist/i18n/en-GB.js +13 -0
  24. package/dist/i18n/en-GB.properties +22 -0
  25. package/dist/i18n/en-US.js +13 -0
  26. package/dist/i18n/en-US.properties +22 -0
  27. package/dist/i18n/en-x-pseudo.js +13 -0
  28. package/dist/i18n/en-x-pseudo.properties +22 -0
  29. package/dist/i18n/es-419.js +13 -0
  30. package/dist/i18n/es-419.properties +22 -0
  31. package/dist/i18n/es-ES.js +13 -0
  32. package/dist/i18n/es-ES.properties +22 -0
  33. package/dist/i18n/fi-FI.js +13 -0
  34. package/dist/i18n/fi-FI.properties +22 -0
  35. package/dist/i18n/fr-CA.js +13 -0
  36. package/dist/i18n/fr-CA.properties +22 -0
  37. package/dist/i18n/fr-FR.js +13 -0
  38. package/dist/i18n/fr-FR.properties +22 -0
  39. package/dist/i18n/hi-IN.js +13 -0
  40. package/dist/i18n/hi-IN.properties +22 -0
  41. package/dist/i18n/it-IT.js +13 -0
  42. package/dist/i18n/it-IT.properties +22 -0
  43. package/dist/i18n/ja-JP.js +13 -0
  44. package/dist/i18n/ja-JP.properties +22 -0
  45. package/dist/i18n/json/src/lib/messages.json +1 -0
  46. package/dist/i18n/ko-KR.js +13 -0
  47. package/dist/i18n/ko-KR.properties +22 -0
  48. package/dist/i18n/nb-NO.js +13 -0
  49. package/dist/i18n/nb-NO.properties +22 -0
  50. package/dist/i18n/nl-NL.js +13 -0
  51. package/dist/i18n/nl-NL.properties +22 -0
  52. package/dist/i18n/pl-PL.js +13 -0
  53. package/dist/i18n/pl-PL.properties +22 -0
  54. package/dist/i18n/pt-BR.js +13 -0
  55. package/dist/i18n/pt-BR.properties +22 -0
  56. package/dist/i18n/ru-RU.js +13 -0
  57. package/dist/i18n/ru-RU.properties +22 -0
  58. package/dist/i18n/sv-SE.js +13 -0
  59. package/dist/i18n/sv-SE.properties +22 -0
  60. package/dist/i18n/tr-TR.js +13 -0
  61. package/dist/i18n/tr-TR.properties +22 -0
  62. package/dist/i18n/zh-CN.js +13 -0
  63. package/dist/i18n/zh-CN.properties +22 -0
  64. package/dist/i18n/zh-TW.js +13 -0
  65. package/dist/i18n/zh-TW.properties +22 -0
  66. package/dist/styles/collaboration-popover.css +1 -0
  67. package/dist/types/index.d.ts +7 -0
  68. package/dist/types/lib/collaboration-popover.d.ts +15 -0
  69. package/dist/types/lib/components/user-avatar.d.ts +8 -0
  70. package/dist/types/lib/components/user-details.d.ts +6 -0
  71. package/dist/types/lib/components/user-info-footer.d.ts +10 -0
  72. package/dist/types/lib/components/user-invite-dropdown.d.ts +10 -0
  73. package/dist/types/lib/messages.d.ts +58 -0
  74. package/dist/types/lib/stories/shared.d.ts +3 -0
  75. package/dist/types/lib/types.d.ts +20 -0
  76. package/dist/types/lib/utils/getInitials.d.ts +1 -0
  77. package/package.json +48 -0
@@ -0,0 +1,58 @@
1
+ declare const messages: {
2
+ inviteAs: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
7
+ editor: {
8
+ defaultMessage: string;
9
+ description: string;
10
+ id: string;
11
+ };
12
+ viewer: {
13
+ defaultMessage: string;
14
+ description: string;
15
+ id: string;
16
+ };
17
+ copySharedLinkButton: {
18
+ defaultMessage: string;
19
+ description: string;
20
+ id: string;
21
+ };
22
+ inviteButton: {
23
+ defaultMessage: string;
24
+ description: string;
25
+ id: string;
26
+ };
27
+ noAccessInvite: {
28
+ defaultMessage: string;
29
+ description: string;
30
+ id: string;
31
+ };
32
+ noAccessSharedLink: {
33
+ defaultMessage: string;
34
+ description: string;
35
+ id: string;
36
+ };
37
+ userAvatarAlt: {
38
+ defaultMessage: string;
39
+ description: string;
40
+ id: string;
41
+ };
42
+ userInfoPopover: {
43
+ defaultMessage: string;
44
+ description: string;
45
+ id: string;
46
+ };
47
+ userDetailsAriaLabel: {
48
+ defaultMessage: string;
49
+ description: string;
50
+ id: string;
51
+ };
52
+ variantIconAriaLabel: {
53
+ defaultMessage: string;
54
+ description: string;
55
+ id: string;
56
+ };
57
+ };
58
+ export default messages;
@@ -0,0 +1,3 @@
1
+ import { CollaborationPopoverProps } from '../collaboration-popover';
2
+ export declare const CollaborationPopoverWithProviders: (props: CollaborationPopoverProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const CollaborationPopoverStoryWrapper: (props: CollaborationPopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ export declare enum CollaborationPopoverType {
2
+ Invite = "invite",
3
+ CopySharedLink = "copySharedLink",
4
+ Collaborator = "collaborator"
5
+ }
6
+ export interface UserInfo {
7
+ id: string;
8
+ name: string;
9
+ email?: string;
10
+ avatarUrl?: string;
11
+ isExternalUser?: boolean;
12
+ isCollaborator?: boolean;
13
+ }
14
+ export interface CollaborationPopoverHandlers {
15
+ onSubmit?: (userInfo: UserInfo, inviteType?: string) => Promise<void> | void;
16
+ onUserClick?: (userInfo: UserInfo) => void;
17
+ onInviteTypeChange?: (open: boolean) => void;
18
+ onClose?: () => void;
19
+ onOpenChange?: (open: boolean) => void;
20
+ }
@@ -0,0 +1 @@
1
+ export declare const getInitials: (name: string) => string;
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@box/collaboration-popover",
3
+ "version": "1.60.2",
4
+ "license": "SEE LICENSE IN LICENSE",
5
+ "peerDependencies": {
6
+ "@box/blueprint-web": "^14.12.2",
7
+ "@box/blueprint-web-assets": "^4.114.3",
8
+ "classnames": "^2.3.2",
9
+ "react": "^18.0.0",
10
+ "react-dom": "^18.0.0",
11
+ "react-intl": "^6.4.2"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "devDependencies": {
17
+ "@box/blueprint-web": "^14.12.2",
18
+ "@box/blueprint-web-assets": "^4.114.3",
19
+ "@box/eslint-plugin-blueprint": "1.1.17",
20
+ "@box/storybook-utils": "0.17.45",
21
+ "react-intl": "^6.4.2"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "main": "./dist/esm/index.js",
27
+ "module": "./dist/esm/index.js",
28
+ "types": "./dist/types/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "require": "./dist/esm/index.js",
32
+ "import": "./dist/esm/index.js",
33
+ "types": "./dist/types/index.d.ts"
34
+ },
35
+ "./*": {
36
+ "require": "./dist/esm/*",
37
+ "import": "./dist/esm/*",
38
+ "types": "./dist/types/*"
39
+ },
40
+ "./i18n/*": {
41
+ "require": "./dist/i18n/*",
42
+ "import": "./dist/i18n/*"
43
+ }
44
+ },
45
+ "sideEffects": [
46
+ "**/*.css"
47
+ ]
48
+ }