@box/unified-share-modal 1.37.1 → 1.37.3
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,79 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import { Modal as o, Status as
|
|
5
|
-
import { Shield as
|
|
6
|
-
import { UnifiedShareForm as
|
|
7
|
-
import
|
|
1
|
+
import w from "clsx";
|
|
2
|
+
import { useState as u, 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";
|
|
7
|
+
import c from "./messages.js";
|
|
8
8
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
9
|
-
import { UnifiedShareFormProvider as
|
|
10
|
-
import { useUnifiedShareModalContext as
|
|
11
|
-
import '../../../../styles/unified-share-form-modal.css';const
|
|
12
|
-
content:
|
|
13
|
-
header:
|
|
14
|
-
body:
|
|
15
|
-
hasFooter:
|
|
16
|
-
loading:
|
|
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_c2luc_1", z = "_header_c2luc_5", B = "_body_c2luc_12", L = "_hasFooter_c2luc_24", R = "_loading_c2luc_28", t = {
|
|
12
|
+
content: j,
|
|
13
|
+
header: z,
|
|
14
|
+
body: B,
|
|
15
|
+
hasFooter: L,
|
|
16
|
+
loading: R
|
|
17
17
|
};
|
|
18
18
|
function W({
|
|
19
|
-
children:
|
|
20
|
-
isOpen:
|
|
21
|
-
onOpenChange:
|
|
22
|
-
onModalViewChange:
|
|
19
|
+
children: l,
|
|
20
|
+
isOpen: g,
|
|
21
|
+
onOpenChange: a,
|
|
22
|
+
onModalViewChange: p
|
|
23
23
|
}) {
|
|
24
24
|
const {
|
|
25
|
-
formatMessage:
|
|
26
|
-
} =
|
|
25
|
+
formatMessage: r
|
|
26
|
+
} = U(), {
|
|
27
27
|
initialContacts: _,
|
|
28
28
|
isFetching: C,
|
|
29
29
|
item: F
|
|
30
|
-
} =
|
|
30
|
+
} = V(), {
|
|
31
31
|
classification: i,
|
|
32
32
|
name: S
|
|
33
|
-
} = F, [b, x] =
|
|
34
|
-
m("default"),
|
|
35
|
-
}, [
|
|
33
|
+
} = F, [b, x] = u(null), [d, m] = u("default"), M = !!l, h = d !== "default", f = N((s) => {
|
|
34
|
+
m("default"), a && a(s);
|
|
35
|
+
}, [a]), y = (s) => {
|
|
36
36
|
s.preventDefault();
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ n(o, {
|
|
39
39
|
onOpenChange: f,
|
|
40
|
-
open:
|
|
40
|
+
open: g,
|
|
41
41
|
children: [M && /* @__PURE__ */ e(o.Trigger, {
|
|
42
|
-
children:
|
|
42
|
+
children: l
|
|
43
43
|
}), /* @__PURE__ */ n(o.Content, {
|
|
44
44
|
ref: x,
|
|
45
45
|
className: t.content,
|
|
46
|
-
onPointerDownOutside:
|
|
46
|
+
onPointerDownOutside: y,
|
|
47
47
|
size: "medium",
|
|
48
48
|
children: [/* @__PURE__ */ n(o.Header, {
|
|
49
49
|
className: t.header,
|
|
50
|
-
children: [
|
|
50
|
+
children: [r(c.title, {
|
|
51
51
|
itemName: S
|
|
52
|
-
}), i && /* @__PURE__ */ e(
|
|
52
|
+
}), i && /* @__PURE__ */ e(I, {
|
|
53
53
|
colorIndex: i.colorId + 1,
|
|
54
|
-
icon:
|
|
54
|
+
icon: v,
|
|
55
55
|
iconPosition: "left",
|
|
56
56
|
text: i.name.toUpperCase()
|
|
57
57
|
})]
|
|
58
58
|
}), /* @__PURE__ */ e(o.Body, {
|
|
59
|
-
className:
|
|
60
|
-
children: /* @__PURE__ */ n(
|
|
59
|
+
className: w(t.body, h && t.hasFooter),
|
|
60
|
+
children: /* @__PURE__ */ n(O, {
|
|
61
61
|
container: b,
|
|
62
62
|
initialContacts: _,
|
|
63
63
|
onModalOpenChange: f,
|
|
64
|
-
onModalViewChange:
|
|
64
|
+
onModalViewChange: p,
|
|
65
65
|
onShareViewChange: m,
|
|
66
|
-
shareView:
|
|
66
|
+
shareView: d,
|
|
67
67
|
children: [C && /* @__PURE__ */ e("div", {
|
|
68
68
|
className: t.loading,
|
|
69
|
-
children: /* @__PURE__ */ e(
|
|
70
|
-
"aria-label":
|
|
69
|
+
children: /* @__PURE__ */ e(P, {
|
|
70
|
+
"aria-label": r(c.loadingLabel),
|
|
71
71
|
size: "large"
|
|
72
72
|
})
|
|
73
|
-
}), /* @__PURE__ */ e(
|
|
73
|
+
}), /* @__PURE__ */ e(D, {})]
|
|
74
74
|
})
|
|
75
75
|
}), !h && /* @__PURE__ */ e(o.Close, {
|
|
76
|
-
"aria-label":
|
|
76
|
+
"aria-label": r(c.closeButton)
|
|
77
77
|
})]
|
|
78
78
|
})]
|
|
79
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._content_c2luc_1._content_c2luc_1{max-width:480px}._header_c2luc_5{display:flex;flex-wrap:wrap;gap:var(--space-2);align-items:center}._body_c2luc_12._body_c2luc_12{position:relative;box-sizing:content-box!important;max-width:432px;padding-top:0;padding-bottom:var(--space-8)}._body_c2luc_12._body_c2luc_12:before{display:block;width:100vw;content:""}._body_c2luc_12._body_c2luc_12._hasFooter_c2luc_24{padding-bottom:0}._loading_c2luc_28{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_c2luc_1{overflow:auto}}@media not (max-width:459px){div:has(>._content_c2luc_1){display:flex;padding:var(--space-8);overflow:auto}._content_c2luc_1{max-height:none;margin:auto;overflow:visible}}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^12.115.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.
|
|
8
|
-
"@box/copy-input": "^1.22.
|
|
9
|
-
"@box/user-selector": "^1.55.
|
|
6
|
+
"@box/blueprint-web": "^12.115.1",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.92.0",
|
|
8
|
+
"@box/copy-input": "^1.22.7",
|
|
9
|
+
"@box/user-selector": "^1.55.7",
|
|
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": "^12.115.
|
|
17
|
-
"@box/blueprint-web-assets": "^4.
|
|
18
|
-
"@box/copy-input": "^1.22.
|
|
19
|
-
"@box/storybook-utils": "0.15.
|
|
16
|
+
"@box/blueprint-web": "^12.115.1",
|
|
17
|
+
"@box/blueprint-web-assets": "^4.92.0",
|
|
18
|
+
"@box/copy-input": "^1.22.7",
|
|
19
|
+
"@box/storybook-utils": "0.15.7",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "1.0.5",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|