@box/unified-share-modal 2.7.9 → 2.7.11

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.
@@ -7,12 +7,12 @@ import n from "./messages.js";
7
7
  import { jsx as t, jsxs as f } from "react/jsx-runtime";
8
8
  import { isInvitationRoleSupported as A, getDefaultCollaborationRole as E } from "../../../utils/collaborator.js";
9
9
  import { useUnifiedShareFormContext as U } from "../../../contexts/unified-share-form-context.js";
10
- import { useUnifiedShareModalContext as W } from "../../../contexts/unified-share-modal-context.js";
11
- import '../../../../../styles/collaboration-role.css';const q = "_button_jl1fl_1", G = "_focusable_jl1fl_10", J = "_content_jl1fl_14", K = "_option_jl1fl_17", a = {
12
- button: q,
13
- focusable: G,
14
- content: J,
15
- option: K
10
+ import { useUnifiedShareModalContext as V } from "../../../contexts/unified-share-modal-context.js";
11
+ import '../../../../../styles/collaboration-role.css';const W = "_button_jl1fl_1", q = "_focusable_jl1fl_10", G = "_content_jl1fl_14", J = "_option_jl1fl_17", s = {
12
+ button: W,
13
+ focusable: q,
14
+ content: G,
15
+ option: J
16
16
  };
17
17
  function le() {
18
18
  const {
@@ -23,27 +23,27 @@ function le() {
23
23
  } = U(), {
24
24
  collaborationRoles: C,
25
25
  eventService: T,
26
- isSubmitting: j,
27
- item: k,
26
+ isSubmitting: k,
27
+ item: j,
28
28
  variant: L
29
- } = W(), {
29
+ } = V(), {
30
30
  permissions: y = {},
31
31
  type: p
32
- } = k, {
32
+ } = j, {
33
33
  onCollaborationRoleChange: v
34
34
  } = T, S = L === "desktop", r = F(() => C.map((l) => {
35
35
  const {
36
- description: u,
36
+ description: b,
37
37
  id: i,
38
- label: s
39
- } = l, b = A(i), d = w(i);
38
+ label: a
39
+ } = l, u = A(i), d = w(i);
40
40
  let R = d;
41
41
  i === "editor" && p === "folder" && (R += "Folder");
42
42
  let I = i, M = "";
43
- return b && (I = e($[`${d}Role`]), M = e(n[`${R}Description`])), {
43
+ return u && (I = e($[`${d}Role`]), M = e(n[`${R}Description`])), {
44
44
  ...l,
45
- description: u ?? M,
46
- label: s ?? I
45
+ description: b ?? M,
46
+ label: a ?? I
47
47
  };
48
48
  }), [C, e, p]);
49
49
  if (z(() => {
@@ -61,10 +61,10 @@ function le() {
61
61
  "data-testid": "collaboration-role-tooltip",
62
62
  side: "bottom",
63
63
  children: /* @__PURE__ */ t(P, {
64
- className: a.focusable,
64
+ className: s.focusable,
65
65
  children: /* @__PURE__ */ t(D, {
66
66
  caretDirection: "down",
67
- className: a.button,
67
+ className: s.button,
68
68
  disabled: !0,
69
69
  label: e(n.inviteAsRoleLabel, {
70
70
  role: _
@@ -81,9 +81,9 @@ function le() {
81
81
  children: [/* @__PURE__ */ t(o.Trigger, {
82
82
  children: /* @__PURE__ */ t(D, {
83
83
  caretDirection: g ? "up" : "down",
84
- className: a.button,
84
+ className: s.button,
85
85
  "data-target-id": "PlainButton-InviteePermissionsMenuToggle",
86
- disabled: j,
86
+ disabled: k,
87
87
  label: e(n.inviteAsRoleLabel, {
88
88
  role: _
89
89
  }),
@@ -92,32 +92,33 @@ function le() {
92
92
  })
93
93
  }), /* @__PURE__ */ f(o.Content, {
94
94
  align: "start",
95
- className: a.content,
95
+ className: s.content,
96
96
  children: [S && /* @__PURE__ */ f(o.Header, {
97
- children: [/* @__PURE__ */ t(o.Header.TextContent, {
97
+ children: [/* @__PURE__ */ t(o.Header.MenuCloseButton, {
98
+ "aria-label": e(n.closeButton),
99
+ iconVariant: "back"
100
+ }), /* @__PURE__ */ t(o.Header.TextContent, {
98
101
  title: e(n.invitePeopleLabel)
99
- }), /* @__PURE__ */ t(o.Header.MenuCloseButton, {
100
- "aria-label": e(n.closeButton)
101
102
  })]
102
103
  }), r.map((l) => {
103
104
  const {
104
- description: u,
105
+ description: b,
105
106
  isDisabled: i,
106
- id: s,
107
- label: b
107
+ id: a,
108
+ label: u
108
109
  } = l, d = () => {
109
- m(l), v && v(s);
110
+ m(l), v && v(a);
110
111
  };
111
112
  return /* @__PURE__ */ t(o.CheckboxItem, {
112
- checked: N === s,
113
+ checked: N === a,
113
114
  disabled: i,
114
115
  onSelect: d,
115
116
  children: /* @__PURE__ */ t(o.Item.MainContent, {
116
- caption: u,
117
- className: a.option,
118
- label: b
117
+ caption: b,
118
+ className: s.option,
119
+ label: u
119
120
  })
120
- }, s);
121
+ }, a);
121
122
  })]
122
123
  })]
123
124
  });
@@ -11,7 +11,7 @@ import '../../../../../styles/shared-link-access.css';const j = "_button_166my_1
11
11
  content: z,
12
12
  option: F
13
13
  };
14
- function Q() {
14
+ function P() {
15
15
  const {
16
16
  formatMessage: s
17
17
  } = T(), [r, h] = y(!1), {
@@ -56,10 +56,11 @@ function Q() {
56
56
  align: "start",
57
57
  className: o.content,
58
58
  children: [l && /* @__PURE__ */ a(e.Header, {
59
- children: [/* @__PURE__ */ t(e.Header.TextContent, {
59
+ children: [/* @__PURE__ */ t(e.Header.MenuCloseButton, {
60
+ "aria-label": s(i.closeButton),
61
+ iconVariant: "back"
62
+ }), /* @__PURE__ */ t(e.Header.TextContent, {
60
63
  title: s(i.shareLinkLabel)
61
- }), /* @__PURE__ */ t(e.Header.MenuCloseButton, {
62
- "aria-label": s(i.closeButton)
63
64
  })]
64
65
  }), d.map((x) => {
65
66
  const {
@@ -97,5 +98,5 @@ function Q() {
97
98
  });
98
99
  }
99
100
  export {
100
- Q as SharedLinkAccess
101
+ P as SharedLinkAccess
101
102
  };
@@ -19,8 +19,8 @@ function W() {
19
19
  isSubmitting: S,
20
20
  item: c,
21
21
  sharedLink: _,
22
- sharingService: L,
23
- variant: k
22
+ sharingService: k,
23
+ variant: L
24
24
  } = A(), {
25
25
  permissions: x = {}
26
26
  } = c, {
@@ -28,7 +28,7 @@ function W() {
28
28
  permission: d
29
29
  } = _, {
30
30
  changeSharedLinkPermission: C
31
- } = L, m = k === "desktop", {
31
+ } = k, m = L === "desktop", {
32
32
  onAction: N
33
33
  } = F(C), {
34
34
  allowedLevels: p,
@@ -37,7 +37,7 @@ function W() {
37
37
  if (M === "collaborators" || !p.length || !u)
38
38
  return null;
39
39
  const {
40
- label: h
40
+ label: b
41
41
  } = u;
42
42
  let i = "";
43
43
  return c.extension === P && d === "can_edit" && (i = o(r.canEditBoxNoteDisabledTooltip)), i ? /* @__PURE__ */ e(O, {
@@ -50,7 +50,7 @@ function W() {
50
50
  caretDirection: "down",
51
51
  className: n.button,
52
52
  disabled: !0,
53
- label: h,
53
+ label: b,
54
54
  size: "extraSmall",
55
55
  variant: "tertiary"
56
56
  })
@@ -65,7 +65,7 @@ function W() {
65
65
  className: n.button,
66
66
  "data-target-id": "Button-SharedLinkPermissionsMenuLabel",
67
67
  disabled: !x.canSetShareAccess || S,
68
- label: h,
68
+ label: b,
69
69
  size: "extraSmall",
70
70
  variant: "tertiary"
71
71
  })
@@ -73,21 +73,22 @@ function W() {
73
73
  align: "start",
74
74
  className: n.content,
75
75
  children: [m && /* @__PURE__ */ a(t.Header, {
76
- children: [/* @__PURE__ */ e(t.Header.TextContent, {
76
+ children: [/* @__PURE__ */ e(t.Header.MenuCloseButton, {
77
+ "aria-label": o(r.closeButton),
78
+ iconVariant: "back"
79
+ }), /* @__PURE__ */ e(t.Header.TextContent, {
77
80
  title: o(r.shareLinkLabel)
78
- }), /* @__PURE__ */ e(t.Header.MenuCloseButton, {
79
- "aria-label": o(r.closeButton)
80
81
  })]
81
82
  }), p.map((T) => {
82
83
  const {
83
84
  description: v,
84
85
  id: s,
85
86
  label: y
86
- } = T, b = d === s, B = () => {
87
- b || N(s);
87
+ } = T, h = d === s, B = () => {
88
+ h || N(s);
88
89
  };
89
90
  return /* @__PURE__ */ e(t.CheckboxItem, {
90
- checked: b,
91
+ checked: h,
91
92
  onSelect: B,
92
93
  children: /* @__PURE__ */ e(t.Item.MainContent, {
93
94
  caption: v,
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "2.7.9",
3
+ "version": "2.7.11",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^13.5.11",
7
- "@box/blueprint-web-assets": "^4.104.6",
8
- "@box/copy-input": "^1.39.16",
9
- "@box/user-selector": "^1.73.17",
6
+ "@box/blueprint-web": "^13.5.13",
7
+ "@box/blueprint-web-assets": "^4.104.8",
8
+ "@box/copy-input": "^1.39.18",
9
+ "@box/user-selector": "^1.73.19",
10
10
  "lodash": "^4.17.15",
11
11
  "react": "^18.0.0",
12
12
  "react-dom": "^18.0.0",
13
13
  "react-intl": "^6.4.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@box/blueprint-web": "^13.5.11",
17
- "@box/blueprint-web-assets": "^4.104.6",
18
- "@box/copy-input": "^1.39.16",
19
- "@box/storybook-utils": "0.16.67",
16
+ "@box/blueprint-web": "^13.5.13",
17
+ "@box/blueprint-web-assets": "^4.104.8",
18
+ "@box/copy-input": "^1.39.18",
19
+ "@box/storybook-utils": "0.16.69",
20
20
  "@box/eslint-plugin-blueprint": "1.1.6",
21
21
  "react-intl": "^6.4.2"
22
22
  },