@box/unified-share-modal 1.37.0 → 1.37.1

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,15 +1,15 @@
1
1
  import y from "lodash/camelCase";
2
2
  import { useIntl as D } from "react-intl";
3
- import { Row as S, Cell as m, Text as n, Tooltip as z, IconButton as B } from "@box/blueprint-web";
4
- import { XMark as L } from "@box/blueprint-web-assets/icons/Fill";
5
- import { CollaboratorAvatar as M } from "./collaborator-avatar.js";
6
- import N from "../messages.js";
3
+ import { Row as N, Cell as m, Text as n, Tooltip as S, IconButton as z } from "@box/blueprint-web";
4
+ import { XMark as B } from "@box/blueprint-web-assets/icons/Fill";
5
+ import { CollaboratorAvatar as L } from "./collaborator-avatar.js";
6
+ import M from "../messages.js";
7
7
  import s from "./messages.js";
8
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
8
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
9
9
  import { isCollaboratorRoleSupported as I } from "../../../utils/collaborator.js";
10
10
  import { useUnifiedShareModalContext as j } from "../../../contexts/unified-share-modal-context.js";
11
11
  import { useUnifiedShareFormContext as k } from "../../../contexts/unified-share-form-context.js";
12
- import '../../../../../styles/collaborator-list-item.css';const w = "_nameCell_y1zd0_1", O = "_nameDetails_y1zd0_7", T = "_roleCell_y1zd0_15", U = "_text_y1zd0_22", l = {
12
+ import '../../../../../styles/collaborator-list-item.css';const w = "_nameCell_y1zd0_1", O = "_nameDetails_y1zd0_7", T = "_roleCell_y1zd0_15", U = "_text_y1zd0_22", o = {
13
13
  nameCell: w,
14
14
  nameDetails: O,
15
15
  roleCell: T,
@@ -20,7 +20,7 @@ function K({
20
20
  isSmall: c
21
21
  }) {
22
22
  const {
23
- formatMessage: o
23
+ formatMessage: t
24
24
  } = D(), {
25
25
  email: i,
26
26
  hasCustomRole: d,
@@ -30,32 +30,34 @@ function K({
30
30
  name: h,
31
31
  role: r
32
32
  } = a, {
33
- item: u,
34
- setCollaborator: v
33
+ item: x,
34
+ setCollaborator: u
35
35
  } = j(), {
36
- permissions: x = {}
37
- } = u, {
36
+ permissions: v = {}
37
+ } = x, {
38
38
  onModalViewChange: _
39
- } = k(), b = I(r) ? o(N[`${y(r)}Role`]) : "", g = d ? r : b, R = () => {
40
- v(a), _("remove-collaborator");
39
+ } = k(), b = I(r) ? t(M[`${y(r)}Role`]) : "", g = d ? r : b, R = () => {
40
+ u(a), _("remove-collaborator");
41
41
  };
42
- return /* @__PURE__ */ t(S, {
42
+ return /* @__PURE__ */ l(N, {
43
43
  id: p,
44
44
  children: [/* @__PURE__ */ e(m, {
45
- children: /* @__PURE__ */ t("div", {
46
- className: l.nameCell,
47
- children: [/* @__PURE__ */ e(M, {
45
+ children: /* @__PURE__ */ l("div", {
46
+ className: o.nameCell,
47
+ children: [/* @__PURE__ */ e(L, {
48
48
  collaborator: a,
49
49
  isBadgeable: !0,
50
50
  size: "large"
51
- }), /* @__PURE__ */ t("div", {
52
- className: l.nameDetails,
51
+ }), /* @__PURE__ */ l("div", {
52
+ className: o.nameDetails,
53
53
  children: [/* @__PURE__ */ e(n, {
54
54
  as: "span",
55
+ className: o.text,
55
56
  variant: "bodyDefaultSemibold",
56
57
  children: h
57
58
  }), i && /* @__PURE__ */ e(n, {
58
59
  as: "span",
60
+ className: o.text,
59
61
  color: "textOnLightSecondary",
60
62
  variant: "caption",
61
63
  children: i
@@ -63,18 +65,18 @@ function K({
63
65
  })]
64
66
  })
65
67
  }), !c && /* @__PURE__ */ e(m, {
66
- children: /* @__PURE__ */ t("div", {
67
- className: l.roleCell,
68
+ children: /* @__PURE__ */ l("div", {
69
+ className: o.roleCell,
68
70
  children: [/* @__PURE__ */ e(n, {
69
71
  as: "span",
70
- className: l.text,
72
+ className: o.text,
71
73
  color: "textOnLightSecondary",
72
- children: C ? o(s.pendingRole) : g
73
- }), f && x.canRemoveCollaborator && /* @__PURE__ */ e(z, {
74
- content: o(s.removeButton),
75
- children: /* @__PURE__ */ e(B, {
76
- "aria-label": o(s.removeButton),
77
- icon: L,
74
+ children: C ? t(s.pendingRole) : g
75
+ }), f && v.canRemoveCollaborator && /* @__PURE__ */ e(S, {
76
+ content: t(s.removeButton),
77
+ children: /* @__PURE__ */ e(z, {
78
+ "aria-label": t(s.removeButton),
79
+ icon: B,
78
80
  onClick: R
79
81
  })
80
82
  })]
@@ -1,19 +1,19 @@
1
- import w from "clsx";
2
- import { useState as g, useCallback as N } from "react";
3
- import { useIntl as U } from "react-intl";
4
- import { Modal as o, Status as I, LoadingIndicator as P } from "@box/blueprint-web";
5
- import { Shield as v } from "@box/blueprint-web-assets/icons/Line";
6
- import { UnifiedShareForm as D } from "./unified-share-form.js";
1
+ import y from "clsx";
2
+ import { useState as g, useCallback as w } from "react";
3
+ import { useIntl as N } from "react-intl";
4
+ import { Modal as o, Status as U, LoadingIndicator as I } from "@box/blueprint-web";
5
+ import { Shield as P } from "@box/blueprint-web-assets/icons/Line";
6
+ import { UnifiedShareForm as v } from "./unified-share-form.js";
7
7
  import l from "./messages.js";
8
8
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
9
- import { UnifiedShareFormProvider as O } from "../../contexts/unified-share-form-context.js";
10
- import { useUnifiedShareModalContext as V } from "../../contexts/unified-share-modal-context.js";
11
- import '../../../../styles/unified-share-form-modal.css';const j = "_content_1xtsr_1", z = "_header_1xtsr_5", B = "_body_1xtsr_12", L = "_hasFooter_1xtsr_23", R = "_loading_1xtsr_27", t = {
12
- content: j,
13
- header: z,
14
- body: B,
15
- hasFooter: L,
16
- loading: R
9
+ import { UnifiedShareFormProvider as D } from "../../contexts/unified-share-form-context.js";
10
+ import { useUnifiedShareModalContext as O } from "../../contexts/unified-share-modal-context.js";
11
+ import '../../../../styles/unified-share-form-modal.css';const V = "_content_6k44r_1", j = "_header_6k44r_5", z = "_body_6k44r_12", B = "_hasFooter_6k44r_23", L = "_loading_6k44r_27", t = {
12
+ content: V,
13
+ header: j,
14
+ body: z,
15
+ hasFooter: B,
16
+ loading: L
17
17
  };
18
18
  function W({
19
19
  children: d,
@@ -23,16 +23,16 @@ function W({
23
23
  }) {
24
24
  const {
25
25
  formatMessage: a
26
- } = U(), {
26
+ } = N(), {
27
27
  initialContacts: _,
28
- isFetching: x,
29
- item: C
30
- } = V(), {
28
+ isFetching: C,
29
+ item: F
30
+ } = O(), {
31
31
  classification: i,
32
- name: F
33
- } = C, [S, b] = g(null), [c, m] = g("default"), M = !!d, h = c !== "default", f = N((s) => {
32
+ name: S
33
+ } = F, [b, x] = g(null), [c, m] = g("default"), M = !!d, h = c !== "default", f = w((s) => {
34
34
  m("default"), r && r(s);
35
- }, [r]), y = (s) => {
35
+ }, [r]), k = (s) => {
36
36
  s.preventDefault();
37
37
  };
38
38
  return /* @__PURE__ */ n(o, {
@@ -41,36 +41,36 @@ function W({
41
41
  children: [M && /* @__PURE__ */ e(o.Trigger, {
42
42
  children: d
43
43
  }), /* @__PURE__ */ n(o.Content, {
44
- ref: b,
44
+ ref: x,
45
45
  className: t.content,
46
- onPointerDownOutside: y,
46
+ onPointerDownOutside: k,
47
47
  size: "medium",
48
48
  children: [/* @__PURE__ */ n(o.Header, {
49
49
  className: t.header,
50
50
  children: [a(l.title, {
51
- itemName: F
52
- }), i && /* @__PURE__ */ e(I, {
51
+ itemName: S
52
+ }), i && /* @__PURE__ */ e(U, {
53
53
  colorIndex: i.colorId + 1,
54
- icon: v,
54
+ icon: P,
55
55
  iconPosition: "left",
56
56
  text: i.name.toUpperCase()
57
57
  })]
58
58
  }), /* @__PURE__ */ e(o.Body, {
59
- className: w(t.body, h && t.hasFooter),
60
- children: /* @__PURE__ */ n(O, {
61
- container: S,
59
+ className: y(t.body, h && t.hasFooter),
60
+ children: /* @__PURE__ */ n(D, {
61
+ container: b,
62
62
  initialContacts: _,
63
63
  onModalOpenChange: f,
64
64
  onModalViewChange: u,
65
65
  onShareViewChange: m,
66
66
  shareView: c,
67
- children: [x && /* @__PURE__ */ e("div", {
67
+ children: [C && /* @__PURE__ */ e("div", {
68
68
  className: t.loading,
69
- children: /* @__PURE__ */ e(P, {
69
+ children: /* @__PURE__ */ e(I, {
70
70
  "aria-label": a(l.loadingLabel),
71
71
  size: "large"
72
72
  })
73
- }), /* @__PURE__ */ e(D, {})]
73
+ }), /* @__PURE__ */ e(v, {})]
74
74
  })
75
75
  }), !h && /* @__PURE__ */ e(o.Close, {
76
76
  "aria-label": a(l.closeButton)
@@ -1 +1 @@
1
- ._content_1xtsr_1._content_1xtsr_1{max-width:480px}._header_1xtsr_5{display:flex;flex-wrap:wrap;gap:var(--space-2);align-items:center}._body_1xtsr_12._body_1xtsr_12{position:relative;max-width:432px;padding-top:0;padding-bottom:var(--space-8)}._body_1xtsr_12._body_1xtsr_12:before{display:block;width:100vw;content:""}._body_1xtsr_12._body_1xtsr_12._hasFooter_1xtsr_23{padding-bottom:0}._loading_1xtsr_27{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;padding-bottom:var(--space-8);background-color:var(--gray-white)}@media not (max-width:374px){._content_1xtsr_1{overflow:visible}}@media not (max-width:459px){div:has(>._content_1xtsr_1){display:flex;padding:var(--space-8);overflow:auto}._content_1xtsr_1{max-height:none;margin:auto}}
1
+ ._content_6k44r_1._content_6k44r_1{max-width:480px}._header_6k44r_5{display:flex;flex-wrap:wrap;gap:var(--space-2);align-items:center}._body_6k44r_12._body_6k44r_12{position:relative;max-width:432px;padding-top:0;padding-bottom:var(--space-8)}._body_6k44r_12._body_6k44r_12:before{display:block;width:100vw;content:""}._body_6k44r_12._body_6k44r_12._hasFooter_6k44r_23{padding-bottom:0}._loading_6k44r_27{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;padding-bottom:var(--space-8);background-color:var(--gray-white)}@media not (max-width:374px){._content_6k44r_1{overflow:auto}}@media not (max-width:459px){div:has(>._content_6k44r_1){display:flex;padding:var(--space-8);overflow:auto}._content_6k44r_1{max-height:none;margin:auto;overflow:visible}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "1.37.0",
3
+ "version": "1.37.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^12.115.0",