@box/unified-share-modal 2.8.5 → 2.8.7

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,41 +1,45 @@
1
- import { useIntl as b } from "react-intl";
2
- import { Switch as x, DateI18nProvider as c, DatePicker as d } from "@box/blueprint-web";
1
+ import { useIntl as c } from "react-intl";
2
+ import { Switch as x, DateI18nProvider as b, DatePicker as d } from "@box/blueprint-web";
3
3
  import a from "./messages.js";
4
- import { jsxs as s, Fragment as k, jsx as r } from "react/jsx-runtime";
5
- import { formatTomorrowDateToCalendarDate as L } from "../../utils/date.js";
6
- function f({
4
+ import { jsxs as k, Fragment as L, jsx as r } from "react/jsx-runtime";
5
+ import { useSharedLinkSettingsContext as u } from "../../contexts/shared-link-settings-context.js";
6
+ import { formatTomorrowDateToCalendarDate as f } from "../../utils/date.js";
7
+ function C({
7
8
  canChange: i,
8
- error: t,
9
+ error: o,
9
10
  expiration: l,
10
11
  isChecked: n,
11
- isDisabled: o,
12
+ isDisabled: t,
12
13
  onChange: p,
13
14
  onToggle: m
14
15
  }) {
15
16
  const {
16
17
  formatMessage: e
17
- } = b();
18
- return /* @__PURE__ */ s(k, {
18
+ } = c(), {
19
+ containerRef: s
20
+ } = u();
21
+ return /* @__PURE__ */ k(L, {
19
22
  children: [/* @__PURE__ */ r(x.Item, {
20
23
  checked: n,
21
- disabled: o || !i,
24
+ disabled: t || !i,
22
25
  label: e(a.linkExpirationToggleText),
23
26
  onCheckedChange: m,
24
27
  value: "link-expiration-settings"
25
28
  }), n && // Get the locale from the user's operating system settings
26
- /* @__PURE__ */ r(c, {
29
+ /* @__PURE__ */ r(b, {
27
30
  locale: navigator.language || "en-US",
28
31
  children: /* @__PURE__ */ r(d, {
29
32
  calendarAriaLabel: e(a.linkExpirationCalendarAriaLabel),
30
33
  clearDatePickerAriaLabel: e(a.linkExpirationClearDatePickerAriaLabel),
31
- error: t,
34
+ error: o,
32
35
  hideLabel: !0,
33
- isDisabled: o || !i,
36
+ isDisabled: t || !i,
34
37
  label: e(a.linkExpirationDatePickerLabel),
35
- minValue: L(),
38
+ minValue: f(),
36
39
  nextMonthAriaLabel: e(a.linkExpirationNextMonthAriaLabel),
37
40
  onChange: p,
38
41
  openCalendarDropdownAriaLabel: e(a.linkExpirationOpenCalendarDropdownAriaLabel),
42
+ portalElement: s,
39
43
  previousMonthAriaLabel: e(a.linkExpirationPreviousMonthAriaLabel),
40
44
  value: l
41
45
  })
@@ -43,5 +47,5 @@ function f({
43
47
  });
44
48
  }
45
49
  export {
46
- f as ExpirationSection
50
+ C as ExpirationSection
47
51
  };
@@ -1,90 +1,92 @@
1
1
  import l from "clsx";
2
- import { useState as j, useEffect as k } from "react";
3
- import { useIntl as C } from "react-intl";
4
- import { Modal as t, LoadingIndicator as F, Divider as B } from "@box/blueprint-web";
5
- import { SharedLinkSettings as N } from "./shared-link-settings.js";
2
+ import { useState as C, useEffect as F } from "react";
3
+ import { useIntl as B } from "react-intl";
4
+ import { Modal as i, LoadingIndicator as N, Divider as x } from "@box/blueprint-web";
5
+ import { SharedLinkSettings as D } from "./shared-link-settings.js";
6
6
  import n from "./messages.js";
7
- import { jsx as i, jsxs as s } from "react/jsx-runtime";
8
- import { ClassificationStatus as x } from "../classification-status/classification-status.js";
9
- import { useUnifiedShareModalContext as D } from "../../contexts/unified-share-modal-context.js";
10
- import { useSharedLinkSettingsContext as M } from "../../contexts/shared-link-settings-context.js";
11
- import '../../../../styles/shared-link-settings-modal.css';const w = "_content_1jgi4_1", I = "_isFullscreen_1jgi4_4", P = "_body_1jgi4_13", z = "_title_1jgi4_17", A = "_form_1jgi4_37", E = "_isLoading_1jgi4_44", H = "_loading_1jgi4_48", U = "_divider_1jgi4_56", e = {
12
- content: w,
13
- isFullscreen: I,
14
- body: P,
15
- title: z,
16
- form: A,
17
- isLoading: E,
18
- loading: H,
7
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
8
+ import { ClassificationStatus as M } from "../classification-status/classification-status.js";
9
+ import { useUnifiedShareModalContext as w } from "../../contexts/unified-share-modal-context.js";
10
+ import { useSharedLinkSettingsContext as I } from "../../contexts/shared-link-settings-context.js";
11
+ import '../../../../styles/shared-link-settings-modal.css';const P = "_content_54561_1", j = "_isFullscreen_54561_4", z = "_body_54561_13", A = "_title_54561_23", E = "_form_54561_43", H = "_isLoading_54561_50", R = "_loading_54561_54", U = "_divider_54561_62", t = {
12
+ content: P,
13
+ isFullscreen: j,
14
+ body: z,
15
+ title: A,
16
+ form: E,
17
+ isLoading: H,
18
+ loading: R,
19
19
  divider: U
20
20
  };
21
- function Y({
21
+ function Z({
22
22
  isOpen: a,
23
- onOpenChange: g
23
+ onOpenChange: f
24
24
  }) {
25
25
  const {
26
26
  formatMessage: o
27
- } = C(), {
27
+ } = B(), {
28
28
  eventService: h,
29
29
  isSubmitting: r,
30
30
  variant: S
31
- } = D(), {
32
- onSharedLinkSettingsClose: f,
31
+ } = w(), {
32
+ onSharedLinkSettingsClose: u,
33
33
  onSharedLinkSettingsLoad: d
34
34
  } = h, c = S === "desktop", {
35
- resetForm: u,
36
- submitForm: L
37
- } = M(), [m, b] = j(!!d);
38
- k(() => {
39
- (async () => d && (a && await d(), b(!a)))();
35
+ resetForm: g,
36
+ setContainerRef: L,
37
+ submitForm: b
38
+ } = I(), [m, p] = C(!!d);
39
+ F(() => {
40
+ (async () => d && (a && await d(), p(!a)))();
40
41
  }, [a, d]);
41
42
  const _ = () => {
42
- r || (u(), f && f(), g(!1));
43
- }, p = async () => {
44
- await L() || (u(), g(!1));
45
- }, v = (y) => {
46
- y.preventDefault();
43
+ r || (g(), u && u(), f(!1));
44
+ }, v = async () => {
45
+ await b() || (g(), f(!1));
46
+ }, y = (k) => {
47
+ k.preventDefault();
47
48
  };
48
- return /* @__PURE__ */ i(t, {
49
+ return /* @__PURE__ */ e(i, {
49
50
  onOpenChange: _,
50
51
  open: a,
51
- children: /* @__PURE__ */ s(t.Content, {
52
- className: l(e.content, c && e.isFullscreen),
53
- onPointerDownOutside: v,
52
+ children: /* @__PURE__ */ s(i.Content, {
53
+ ref: L,
54
+ className: l(t.content, c && t.isFullscreen),
55
+ onPointerDownOutside: y,
54
56
  size: "medium",
55
- children: [/* @__PURE__ */ s(t.Header, {
56
- children: [/* @__PURE__ */ i("div", {
57
- className: e.title,
57
+ children: [/* @__PURE__ */ s(i.Header, {
58
+ children: [/* @__PURE__ */ e("div", {
59
+ className: t.title,
58
60
  children: o(n.title)
59
- }), /* @__PURE__ */ i(x, {})]
61
+ }), /* @__PURE__ */ e(M, {})]
60
62
  }), /* @__PURE__ */ s("div", {
61
- className: l(e.form),
62
- children: [m && /* @__PURE__ */ i("div", {
63
- className: e.loading,
64
- children: /* @__PURE__ */ i(F, {
63
+ className: l(t.form),
64
+ children: [m && /* @__PURE__ */ e("div", {
65
+ className: t.loading,
66
+ children: /* @__PURE__ */ e(N, {
65
67
  "aria-label": o(n.loadingLabel),
66
68
  size: "large"
67
69
  })
68
- }), /* @__PURE__ */ s(t.Body, {
69
- className: l(e.body, m && e.isLoading),
70
- children: [c && /* @__PURE__ */ i(B, {
71
- className: e.divider
72
- }), /* @__PURE__ */ i(N, {})]
73
- }), /* @__PURE__ */ s(t.Footer, {
74
- className: l(m && e.isLoading),
75
- children: [/* @__PURE__ */ i(t.Footer.SecondaryButton, {
70
+ }), /* @__PURE__ */ s(i.Body, {
71
+ className: l(t.body, m && t.isLoading),
72
+ children: [c && /* @__PURE__ */ e(x, {
73
+ className: t.divider
74
+ }), /* @__PURE__ */ e(D, {})]
75
+ }), /* @__PURE__ */ s(i.Footer, {
76
+ className: l(m && t.isLoading),
77
+ children: [/* @__PURE__ */ e(i.Footer.SecondaryButton, {
76
78
  disabled: r,
77
79
  onClick: _,
78
80
  children: o(n.cancelButton)
79
- }), /* @__PURE__ */ i(t.Footer.PrimaryButton, {
81
+ }), /* @__PURE__ */ e(i.Footer.PrimaryButton, {
80
82
  id: "usm-SharedLinkSettingsModal-primaryButton",
81
83
  loading: r,
82
84
  loadingAriaLabel: o(n.loadingLabel),
83
- onClick: p,
85
+ onClick: v,
84
86
  children: o(n.saveButton)
85
87
  })]
86
88
  })]
87
- }), !c && /* @__PURE__ */ i(t.Close, {
89
+ }), !c && /* @__PURE__ */ e(i.Close, {
88
90
  "aria-label": o(n.closeButton),
89
91
  disabled: r
90
92
  })]
@@ -92,5 +94,5 @@ function Y({
92
94
  });
93
95
  }
94
96
  export {
95
- Y as SharedLinkSettingsModal
97
+ Z as SharedLinkSettingsModal
96
98
  };
@@ -8,15 +8,15 @@ import { VanitySection as _ } from "./vanity-section.js";
8
8
  import n from "./messages.js";
9
9
  import { jsxs as q, Fragment as z, jsx as s } from "react/jsx-runtime";
10
10
  import { useAccessLevels as G } from "../../hooks/use-access-levels.js";
11
- import { useSharedLinkSettingsContext as H } from "../../contexts/shared-link-settings-context.js";
12
- import { useUnifiedShareModalContext as J } from "../../contexts/unified-share-modal-context.js";
11
+ import { useUnifiedShareModalContext as H } from "../../contexts/unified-share-modal-context.js";
12
+ import { useSharedLinkSettingsContext as J } from "../../contexts/shared-link-settings-context.js";
13
13
  function se() {
14
14
  const {
15
15
  formatMessage: t
16
16
  } = F(), {
17
17
  isSubmitting: r,
18
18
  sharedLink: b
19
- } = J(), {
19
+ } = H(), {
20
20
  settings: w = {},
21
21
  vanityDomain: v = ""
22
22
  } = b, {
@@ -36,7 +36,7 @@ function se() {
36
36
  setFieldError: i,
37
37
  setFieldValue: o,
38
38
  validatePassword: E
39
- } = H(), u = V(() => {
39
+ } = J(), u = V(() => {
40
40
  if (!l)
41
41
  return null;
42
42
  switch (l.id) {
@@ -1,8 +1,8 @@
1
- import { useRef as G, useCallback as I, useEffect as V } from "react";
1
+ import { useRef as G, useCallback as P, useEffect as V } from "react";
2
2
  import { useIntl as q } from "react-intl";
3
- import { useNotification as H, Text as y, Tooltip as C, Focusable as J, Switch as Q, Status as W, Link as X, Button as Y } from "@box/blueprint-web";
3
+ import { useNotification as H, Text as C, Tooltip as v, Focusable as J, Switch as Q, Status as W, Link as X, Button as Y } from "@box/blueprint-web";
4
4
  import { ClockBadge as Z } from "@box/blueprint-web-assets/icons/Line";
5
- import { Mail as $, Globe as P } from "@box/blueprint-web-assets/icons/Medium";
5
+ import { Mail as $, Globe as B } from "@box/blueprint-web-assets/icons/Medium";
6
6
  import { SurfaceStatusSurfaceRed as ee, bpSize040 as g } from "@box/blueprint-web-assets/tokens/tokens";
7
7
  import { CopyInput as te } from "@box/copy-input";
8
8
  import { SharedLinkAccess as ie } from "./shared-link-access.js";
@@ -27,72 +27,74 @@ function Ie() {
27
27
  const {
28
28
  formatMessage: e
29
29
  } = q(), {
30
- addNotification: v
30
+ addNotification: x
31
31
  } = H(), k = G(null), {
32
32
  isInteracted: f,
33
33
  isSharedLinkAutoCopied: L,
34
34
  isSharedLinkAutoCreated: r,
35
- setForm: B
35
+ setForm: F
36
36
  } = ne(), {
37
37
  config: s,
38
- eventService: F,
39
- isFetching: x,
38
+ eventService: M,
39
+ isFetching: T,
40
40
  isSubmitting: n,
41
- item: M,
42
- setView: T,
41
+ item: O,
42
+ setView: _,
43
43
  sharedLink: o,
44
- sharingService: O
44
+ sharingService: R
45
45
  } = oe(), {
46
- permissions: _ = {}
47
- } = M, {
48
- onSharedLinkCopy: S,
49
- onSharedLinkSettingsClick: A
50
- } = F, {
51
- createSharedLink: N
46
+ permissions: A = {}
52
47
  } = O, {
53
- notifications: E,
54
- sharedLinkAutoCopy: R,
55
- sharedLinkAutoCreate: D
56
- } = s, a = !!o.url, h = R && !L.current && !f, j = D && !r.current && !f, U = I(async () => {
57
- const l = await N();
48
+ onSharedLinkCopy: S,
49
+ onSharedLinkSettingsClick: N
50
+ } = M, {
51
+ createSharedLink: E
52
+ } = R, {
53
+ notifications: D,
54
+ sharedLinkAutoCopy: b,
55
+ sharedLinkAutoCreate: j
56
+ } = s, a = !!o.url, h = b && !L.current && !f, w = j && !r.current && !f, U = P(async () => {
57
+ const l = await E();
58
58
  return h ? {
59
59
  messages: []
60
60
  } : l;
61
- }, [h, N]), {
62
- onAction: b
61
+ }, [h, E]), {
62
+ onAction: y
63
63
  } = re(U, "create-shared-link");
64
64
  V(() => {
65
- (async () => x || n || ((h || j) && !a && (await b(), r.current = !0), h && a && k.current && (k.current.click(), L.current = !0)))();
66
- }, [a, h, j, x, L, r, n, b]);
67
- const z = I((l) => {
65
+ (async () => T || n || ((h || w) && !a && (await y(), r.current = !0), h && a && k.current && (k.current.click(), L.current = !0)))();
66
+ }, [a, h, w, T, L, r, n, y]);
67
+ const z = P((l) => {
68
+ if (S && S(l), !b || !D.includes("auto-copy-shared-link"))
69
+ return;
68
70
  let p;
69
- typeof l != "string" ? p = r.current ? e(t.autoCreateCopyErrorNoticeText) : null : p = r.current ? e(t.autoCreateCopySuccessNoticeText) : e(t.autoCopySuccessNoticeText), p && E.includes("auto-copy-shared-link") && v({
71
+ typeof l != "string" ? p = r.current ? e(t.autoCreateCopyErrorNoticeText) : null : p = r.current ? e(t.autoCreateCopySuccessNoticeText) : e(t.autoCopySuccessNoticeText), p && x({
70
72
  ...se(e, "success"),
71
73
  styledText: p
72
- }), S && S(l);
73
- }, [v, e, r, E, S]), K = async (l) => {
74
+ });
75
+ }, [x, e, r, D, S, b]), K = async (l) => {
74
76
  if (l) {
75
- await b();
77
+ await y();
76
78
  return;
77
79
  }
78
- T("remove-shared-link");
79
- }, w = () => {
80
- if (A) {
81
- A();
80
+ _("remove-shared-link");
81
+ }, I = () => {
82
+ if (N) {
83
+ N();
82
84
  return;
83
85
  }
84
- T("shared-link-settings");
86
+ _("shared-link-settings");
85
87
  };
86
88
  let u, m = !1;
87
- return !a && !n && (u = e(t.sharedLinkToggleTooltip)), !a && !_.canShare && (u = e(t.createLinkDisabledTooltip), m = !0), a && !_.canSetShareAccess && (u = e(t.removeLinkDisabledTooltip), m = !0), /* @__PURE__ */ d("div", {
89
+ return !a && !n && (u = e(t.sharedLinkToggleTooltip)), !a && !A.canShare && (u = e(t.createLinkDisabledTooltip), m = !0), a && !A.canSetShareAccess && (u = e(t.removeLinkDisabledTooltip), m = !0), /* @__PURE__ */ d("div", {
88
90
  className: c.container,
89
- children: [/* @__PURE__ */ i(y, {
91
+ children: [/* @__PURE__ */ i(C, {
90
92
  as: "label",
91
93
  variant: "bodyDefaultBold",
92
94
  children: e(t.shareLinkLabel)
93
95
  }), /* @__PURE__ */ d("div", {
94
96
  className: c.toggle,
95
- children: [/* @__PURE__ */ i(C, {
97
+ children: [/* @__PURE__ */ i(v, {
96
98
  align: "start",
97
99
  content: u,
98
100
  "data-testid": "shared-link-tooltip",
@@ -108,7 +110,7 @@ function Ie() {
108
110
  value: "shared-link"
109
111
  })
110
112
  })
111
- }), a && !!o.expiresAt && /* @__PURE__ */ i(C, {
113
+ }), a && !!o.expiresAt && /* @__PURE__ */ i(v, {
112
114
  content: e(t.expirationIconTooltip, {
113
115
  expirationDate: ce(o.expiresAt)
114
116
  }),
@@ -124,8 +126,8 @@ function Ie() {
124
126
  "aria-haspopup": "dialog",
125
127
  className: c.settings,
126
128
  "data-target-id": "PlainButton-SharedLinkSettings",
127
- onClick: w,
128
- onKeyDown: le(w, {
129
+ onClick: I,
130
+ onKeyDown: le(I, {
129
131
  canPreventDefault: !0
130
132
  }),
131
133
  role: "button",
@@ -137,14 +139,14 @@ function Ie() {
137
139
  className: c.copy,
138
140
  children: [/* @__PURE__ */ i(te, {
139
141
  ref: k,
140
- autoFocus: D && r.current && !f,
142
+ autoFocus: j && r.current && !f,
141
143
  "data-target-id": "Button-CopySharedLink",
142
144
  disabled: n,
143
145
  hideLabel: !0,
144
146
  label: e(t.sharedLinkUrlLabel),
145
147
  onCopy: z,
146
148
  value: o.url
147
- }), s.sharedLinkEmail && /* @__PURE__ */ i(C, {
149
+ }), s.sharedLinkEmail && /* @__PURE__ */ i(v, {
148
150
  align: "end",
149
151
  content: e(t.sharedLinkEmailLabel),
150
152
  children: /* @__PURE__ */ i(Y, {
@@ -152,7 +154,7 @@ function Ie() {
152
154
  "data-target-id": "Button-SendSharedLink",
153
155
  disabled: n,
154
156
  icon: $,
155
- onClick: () => B("email"),
157
+ onClick: () => F("email"),
156
158
  size: "large",
157
159
  variant: "secondary"
158
160
  })
@@ -161,21 +163,21 @@ function Ie() {
161
163
  className: c.access,
162
164
  children: [s.sharedLinkAccess && /* @__PURE__ */ i(ie, {}), s.sharedLinkPermission && /* @__PURE__ */ i(ae, {})]
163
165
  }), a && o.access === "open" && /* @__PURE__ */ d("div", {
164
- children: [/* @__PURE__ */ i(P, {
166
+ children: [/* @__PURE__ */ i(B, {
165
167
  className: c.icon,
166
168
  height: g,
167
169
  width: g
168
- }), /* @__PURE__ */ i(y, {
170
+ }), /* @__PURE__ */ i(C, {
169
171
  as: "span",
170
172
  color: "textOnLightSecondary",
171
173
  children: o.permission === "can_edit" ? e(t.sharedLinkEditablePubliclyAvailable) : e(t.sharedLinkPubliclyAvailable)
172
174
  })]
173
175
  }), a && o.access === "company" && o.permission === "can_edit" && /* @__PURE__ */ d("div", {
174
- children: [/* @__PURE__ */ i(P, {
176
+ children: [/* @__PURE__ */ i(B, {
175
177
  className: c.icon,
176
178
  height: g,
177
179
  width: g
178
- }), /* @__PURE__ */ i(y, {
180
+ }), /* @__PURE__ */ i(C, {
179
181
  as: "span",
180
182
  color: "textOnLightSecondary",
181
183
  children: e(t.sharedLinkElevatedEditableCompanyAvailable)
@@ -1,58 +1,60 @@
1
- import { createContext as f, useContext as w, useMemo as x } from "react";
2
- import { useUnifiedShareModalContext as E } from "./unified-share-modal-context.js";
3
- import { jsx as F } from "react/jsx-runtime";
4
- import { formatDateFromTimestampToCalendarDate as g } from "../utils/date.js";
5
- import { useLinkSettingsForm as k } from "../hooks/use-link-settings-form.js";
6
- const S = /* @__PURE__ */ f(null), V = () => {
7
- const e = w(S);
1
+ import { createContext as E, useContext as F, useState as C, useMemo as x } from "react";
2
+ import { useUnifiedShareModalContext as g } from "./unified-share-modal-context.js";
3
+ import { jsx as k } from "react/jsx-runtime";
4
+ import { formatDateFromTimestampToCalendarDate as L } from "../utils/date.js";
5
+ import { useLinkSettingsForm as v } from "../hooks/use-link-settings-form.js";
6
+ const f = /* @__PURE__ */ E(null), M = () => {
7
+ const e = F(f);
8
8
  if (!e)
9
9
  throw new Error("useSharedLinkSettingsContext must be used with SharedLinkSettingsProvider");
10
10
  return e;
11
- }, y = ({
11
+ }, N = ({
12
12
  children: e
13
13
  }) => {
14
14
  const {
15
15
  sharedLink: h
16
- } = E(), {
16
+ } = g(), {
17
17
  expiresAt: t = 0,
18
18
  settings: p = {},
19
- vanityName: r = ""
19
+ vanityName: n = ""
20
20
  } = h, {
21
- isDownloadEnabled: n,
21
+ isDownloadEnabled: r,
22
22
  isPasswordEnabled: s
23
- } = p, o = x(() => ({
24
- expiration: t ? g(t) : null,
25
- isDownloadEnabled: !!n,
23
+ } = p, [i, b] = C(null), o = x(() => ({
24
+ expiration: t ? L(t) : null,
25
+ isDownloadEnabled: !!r,
26
26
  isExpirationEnabled: !!t,
27
27
  isPasswordEnabled: !!s,
28
- isVanityNameEnabled: !!r,
28
+ isVanityNameEnabled: !!n,
29
29
  password: "",
30
- vanityName: r
31
- }), [t, n, s, r]), {
32
- errors: i,
33
- formData: a,
34
- handleFormReset: d,
35
- handleFormSubmit: m,
36
- setFieldError: l,
37
- setFieldValue: u,
38
- validatePassword: c
39
- } = k(o), b = x(() => ({
40
- errors: i,
41
- formData: a,
30
+ vanityName: n
31
+ }), [t, r, s, n]), {
32
+ errors: a,
33
+ formData: d,
34
+ handleFormReset: m,
35
+ handleFormSubmit: l,
36
+ setFieldError: u,
37
+ setFieldValue: c,
38
+ validatePassword: S
39
+ } = v(o), w = x(() => ({
40
+ containerRef: i,
41
+ errors: a,
42
+ formData: d,
42
43
  initialFormData: o,
43
- resetForm: d,
44
- setFieldError: l,
45
- setFieldValue: u,
46
- submitForm: m,
47
- validatePassword: c
48
- }), [i, a, d, m, o, l, u, c]);
49
- return /* @__PURE__ */ F(S.Provider, {
50
- value: b,
44
+ resetForm: m,
45
+ setContainerRef: b,
46
+ setFieldError: u,
47
+ setFieldValue: c,
48
+ submitForm: l,
49
+ validatePassword: S
50
+ }), [i, a, d, m, l, o, u, c, S]);
51
+ return /* @__PURE__ */ k(f.Provider, {
52
+ value: w,
51
53
  children: e
52
54
  });
53
55
  };
54
56
  export {
55
- S as SharedLinkSettingsContext,
56
- y as SharedLinkSettingsProvider,
57
- V as useSharedLinkSettingsContext
57
+ f as SharedLinkSettingsContext,
58
+ N as SharedLinkSettingsProvider,
59
+ M as useSharedLinkSettingsContext
58
60
  };
@@ -1 +1 @@
1
- ._content_1jgi4_1._content_1jgi4_1{max-width:480px}._content_1jgi4_1._content_1jgi4_1._isFullscreen_1jgi4_4{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;border-radius:0;animation:none}._content_1jgi4_1._content_1jgi4_1._isFullscreen_1jgi4_4 ._body_1jgi4_13{overflow:hidden auto}._title_1jgi4_17{display:inline}._title_1jgi4_17:after{display:inline-block;width:var(--bp-space-020);content:""}._body_1jgi4_13._body_1jgi4_13{display:flex;flex-direction:column;flex-grow:1;gap:var(--bp-space-040);margin-bottom:calc(var(--bp-space-010) * -1);padding-top:0;padding-bottom:var(--bp-space-010);overflow:auto}._form_1jgi4_37{position:relative;display:flex;flex-direction:column;flex-grow:1;overflow:hidden}._form_1jgi4_37 ._isLoading_1jgi4_44{visibility:hidden}._loading_1jgi4_48{position:absolute;inset:0;display:flex;align-items:center;padding-bottom:var(--bp-space-080)}._divider_1jgi4_56._divider_1jgi4_56{position:sticky;top:0;z-index:1;width:100%}
1
+ ._content_54561_1._content_54561_1{max-width:480px}._content_54561_1._content_54561_1._isFullscreen_54561_4{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;border-radius:0;animation:none}._content_54561_1._content_54561_1._isFullscreen_54561_4 ._body_54561_13{overflow:hidden auto}._content_54561_1._content_54561_1 [data-radix-popper-content-wrapper]:has([data-side=top]){margin-top:max(332px - var(--radix-popper-available-height),0px)}._content_54561_1._content_54561_1 [data-radix-popper-content-wrapper]:has([data-side=bottom]){margin-top:min((332px - var(--radix-popper-available-height)) * -1,0px)}._title_54561_23{display:inline}._title_54561_23:after{display:inline-block;width:var(--bp-space-020);content:""}._body_54561_13._body_54561_13{display:flex;flex-direction:column;flex-grow:1;gap:var(--bp-space-040);margin-bottom:calc(var(--bp-space-010) * -1);padding-top:0;padding-bottom:var(--bp-space-010);overflow:auto}._form_54561_43{position:relative;display:flex;flex-direction:column;flex-grow:1;overflow:hidden}._form_54561_43 ._isLoading_54561_50{visibility:hidden}._loading_54561_54{position:absolute;inset:0;display:flex;align-items:center;padding-bottom:var(--bp-space-080)}._divider_54561_62._divider_54561_62{position:sticky;top:0;z-index:1;width:100%}
@@ -1,11 +1,13 @@
1
- import { ReactNode } from 'react';
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
2
  import { FormErrors } from '../hooks/use-form-validation';
3
3
  import { LinkSettingsFormData } from '../types';
4
4
  export interface SharedLinkSettingsContextValue {
5
+ containerRef: HTMLDivElement | null;
5
6
  errors: FormErrors;
6
7
  formData: LinkSettingsFormData;
7
8
  initialFormData: LinkSettingsFormData;
8
9
  resetForm: () => void;
10
+ setContainerRef: Dispatch<SetStateAction<HTMLDivElement | null>>;
9
11
  setFieldError: (field: any, error: any) => void;
10
12
  setFieldValue: (field: any, value: any) => void;
11
13
  submitForm: () => Promise<boolean>;
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "2.8.5",
3
+ "version": "2.8.7",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^13.8.0",
7
- "@box/blueprint-web-assets": "^4.108.1",
8
- "@box/copy-input": "^1.39.29",
9
- "@box/user-selector": "^1.73.30",
6
+ "@box/blueprint-web": "^13.8.1",
7
+ "@box/blueprint-web-assets": "^4.109.0",
8
+ "@box/copy-input": "^1.39.30",
9
+ "@box/user-selector": "^1.73.31",
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.8.0",
17
- "@box/blueprint-web-assets": "^4.108.1",
18
- "@box/copy-input": "^1.39.29",
19
- "@box/storybook-utils": "0.16.79",
16
+ "@box/blueprint-web": "^13.8.1",
17
+ "@box/blueprint-web-assets": "^4.109.0",
18
+ "@box/copy-input": "^1.39.30",
19
+ "@box/storybook-utils": "0.16.80",
20
20
  "@box/eslint-plugin-blueprint": "1.1.6",
21
21
  "react-intl": "^6.4.2"
22
22
  },