@box/user-selector 1.47.9 → 1.48.0
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.
- package/dist/chunks/user-selector-headless.module.js +11 -12
- package/dist/esm/lib/user-selector-headless/components/user-selector-default-empty.js +25 -25
- package/dist/esm/lib/user-selector-headless/hooks/use-select-options.js +13 -13
- package/dist/esm/lib/user-selector-headless/user-selector-headless.js +113 -114
- package/dist/esm/lib/user-selector-list-item.js +62 -63
- package/dist/i18n/en-x-pseudo.js +10 -10
- package/dist/i18n/en-x-pseudo.properties +10 -10
- package/package.json +8 -8
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import '../styles/user-selector-headless.css';const
|
|
2
|
-
userSelectorListItemBase: e,
|
|
1
|
+
import '../styles/user-selector-headless.css';const t = "_userSelectorInviteRow_19h0i_2", e = "_popoverContainer_19h0i_19", o = "_popoverContent_19h0i_27", r = "_userSelectorListItem_19h0i_2", s = "_listItemAvatar_19h0i_38", n = "_userSelectorGhostStateItem_19h0i_42", c = "_titleGhost_19h0i_48", i = "_userSelectorEmptyText_19h0i_52", _ = "_userSelectorEmptyContainer_19h0i_65", l = "_userSelectorInviteButtonIcon_19h0i_80", u = {
|
|
3
2
|
userSelectorInviteRow: t,
|
|
4
|
-
popoverContainer:
|
|
5
|
-
popoverContent:
|
|
6
|
-
userSelectorListItem:
|
|
7
|
-
listItemAvatar:
|
|
8
|
-
userSelectorGhostStateItem:
|
|
9
|
-
titleGhost:
|
|
10
|
-
userSelectorEmptyText:
|
|
11
|
-
userSelectorEmptyContainer:
|
|
12
|
-
userSelectorInviteButtonIcon:
|
|
3
|
+
popoverContainer: e,
|
|
4
|
+
popoverContent: o,
|
|
5
|
+
userSelectorListItem: r,
|
|
6
|
+
listItemAvatar: s,
|
|
7
|
+
userSelectorGhostStateItem: n,
|
|
8
|
+
titleGhost: c,
|
|
9
|
+
userSelectorEmptyText: i,
|
|
10
|
+
userSelectorEmptyContainer: _,
|
|
11
|
+
userSelectorInviteButtonIcon: l
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
u as s
|
|
16
15
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { AvatarPlusBadge as
|
|
3
|
-
import { useCallback as
|
|
1
|
+
import { Text as c } from "@box/blueprint-web";
|
|
2
|
+
import { AvatarPlusBadge as n } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
+
import { useCallback as i } from "react";
|
|
4
4
|
import { useIntl as p } from "react-intl";
|
|
5
5
|
import a from "../../messages.js";
|
|
6
6
|
import { useUserSelector as u } from "../user-selector-context.js";
|
|
7
|
-
import { s as
|
|
8
|
-
import { jsxs as m, jsx as
|
|
9
|
-
const
|
|
10
|
-
handleInvite:
|
|
7
|
+
import { s as e } from "../../../../chunks/user-selector-headless.module.js";
|
|
8
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
9
|
+
const C = ({
|
|
10
|
+
handleInvite: r
|
|
11
11
|
}) => {
|
|
12
12
|
const {
|
|
13
|
-
formatMessage:
|
|
13
|
+
formatMessage: s
|
|
14
14
|
} = p(), {
|
|
15
15
|
value: o
|
|
16
|
-
} = u(),
|
|
17
|
-
|
|
18
|
-
}, [
|
|
16
|
+
} = u(), l = i(() => {
|
|
17
|
+
r?.(o);
|
|
18
|
+
}, [r, o]);
|
|
19
19
|
return /* @__PURE__ */ m("div", {
|
|
20
|
-
className:
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
-
className:
|
|
23
|
-
children:
|
|
24
|
-
}),
|
|
25
|
-
className:
|
|
26
|
-
onClick:
|
|
20
|
+
className: e.userSelectorEmptyContainer,
|
|
21
|
+
children: [/* @__PURE__ */ t("div", {
|
|
22
|
+
className: e.userSelectorEmptyText,
|
|
23
|
+
children: s(a.emptyMessage)
|
|
24
|
+
}), r && /* @__PURE__ */ m("button", {
|
|
25
|
+
className: e.userSelectorInviteRow,
|
|
26
|
+
onClick: l,
|
|
27
27
|
tabIndex: 0,
|
|
28
28
|
type: "button",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
30
|
-
className:
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
}), /* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ t("span", {
|
|
30
|
+
className: e.userSelectorInviteButtonIcon,
|
|
31
|
+
children: /* @__PURE__ */ t(n, {})
|
|
32
|
+
}), /* @__PURE__ */ t(c, {
|
|
33
33
|
as: "span",
|
|
34
|
-
className:
|
|
34
|
+
className: e.userName,
|
|
35
35
|
variant: "bodyDefault",
|
|
36
|
-
children:
|
|
36
|
+
children: s(a.inviteCollaborators)
|
|
37
37
|
})]
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
C as UserSelectorDefaultEmpty
|
|
43
43
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import O from "lodash/debounce";
|
|
2
2
|
import { useState as e, useCallback as y, useMemo as E, useEffect as b } from "react";
|
|
3
3
|
const S = ({
|
|
4
|
-
fetcher:
|
|
4
|
+
fetcher: a,
|
|
5
5
|
value: n,
|
|
6
|
-
debounceTime:
|
|
6
|
+
debounceTime: r = 250,
|
|
7
7
|
allowEmptyQuery: f = !1
|
|
8
8
|
}) => {
|
|
9
|
-
const [u, o] = e(!1), [
|
|
9
|
+
const [u, o] = e(!1), [d, c] = e(!1), [m, l] = e(null), [g, i] = e([]), p = y(async (h) => {
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
c(
|
|
13
|
-
} catch (
|
|
14
|
-
l(
|
|
11
|
+
const t = await a(h);
|
|
12
|
+
c(t?.length === 0), i(t);
|
|
13
|
+
} catch (t) {
|
|
14
|
+
l(t);
|
|
15
15
|
} finally {
|
|
16
16
|
o(!1);
|
|
17
17
|
}
|
|
18
|
-
}, [
|
|
19
|
-
return b(() => (n.length || f ? (o(!0), l(null), c(!1),
|
|
18
|
+
}, [a]), s = E(() => O(p, r), [p, r]);
|
|
19
|
+
return b(() => (n.length || f ? (o(!0), l(null), c(!1), s(n)) : (s.cancel(), o(!1), i([]), l(null), c(!1)), () => s.cancel()), [n, s, f]), {
|
|
20
20
|
isLoading: u,
|
|
21
|
-
isEmpty:
|
|
22
|
-
error:
|
|
23
|
-
options:
|
|
21
|
+
isEmpty: d,
|
|
22
|
+
error: m,
|
|
23
|
+
options: g
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
@@ -1,163 +1,162 @@
|
|
|
1
|
-
import { Popover as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { UserSelectorContent as
|
|
5
|
-
import { useAvatars as
|
|
6
|
-
import { useKeyboardNavigation as
|
|
1
|
+
import { Popover as m } from "@box/blueprint-web";
|
|
2
|
+
import J from "clsx";
|
|
3
|
+
import { forwardRef as Q, useState as W, useId as X, useRef as Y, useMemo as K, useCallback as i, useImperativeHandle as Z, useEffect as _ } from "react";
|
|
4
|
+
import { UserSelectorContent as F } from "./components/user-selector-content.js";
|
|
5
|
+
import { useAvatars as U } from "./hooks/use-avatars.js";
|
|
6
|
+
import { useKeyboardNavigation as E } from "./hooks/use-keyboard-navigation.js";
|
|
7
7
|
import { useSelectOptions as tt } from "./hooks/use-select-options.js";
|
|
8
|
-
import { UserSelectorContext as
|
|
9
|
-
import { s as
|
|
10
|
-
import { jsx as
|
|
11
|
-
const
|
|
12
|
-
fetchUsers:
|
|
13
|
-
fetchAvatarUrls:
|
|
14
|
-
open:
|
|
15
|
-
value:
|
|
16
|
-
rootElement:
|
|
17
|
-
onSelectedUserChange:
|
|
18
|
-
inputElementRef:
|
|
19
|
-
focusOnOpen:
|
|
20
|
-
renderError:
|
|
21
|
-
renderEmpty:
|
|
22
|
-
loadingAriaLabel:
|
|
23
|
-
ariaRoleDescription:
|
|
8
|
+
import { UserSelectorContext as ot } from "./user-selector-context.js";
|
|
9
|
+
import { s as M } from "../../../chunks/user-selector-headless.module.js";
|
|
10
|
+
import { jsx as f, jsxs as et } from "react/jsx-runtime";
|
|
11
|
+
const mt = /* @__PURE__ */ Q(({
|
|
12
|
+
fetchUsers: g,
|
|
13
|
+
fetchAvatarUrls: w,
|
|
14
|
+
open: d,
|
|
15
|
+
value: y,
|
|
16
|
+
rootElement: R,
|
|
17
|
+
onSelectedUserChange: a,
|
|
18
|
+
inputElementRef: N,
|
|
19
|
+
focusOnOpen: A = !1,
|
|
20
|
+
renderError: $,
|
|
21
|
+
renderEmpty: H,
|
|
22
|
+
loadingAriaLabel: L,
|
|
23
|
+
ariaRoleDescription: P,
|
|
24
24
|
nativeFocusEnabled: c = !0,
|
|
25
|
-
allowEmptyQuery:
|
|
26
|
-
onInvite:
|
|
27
|
-
popoverContentContainerProps:
|
|
28
|
-
},
|
|
29
|
-
const [
|
|
25
|
+
allowEmptyQuery: V = !1,
|
|
26
|
+
onInvite: q,
|
|
27
|
+
popoverContentContainerProps: b
|
|
28
|
+
}, S) => {
|
|
29
|
+
const [s, I] = W(null), {
|
|
30
30
|
options: t,
|
|
31
31
|
isEmpty: j,
|
|
32
32
|
isLoading: k,
|
|
33
|
-
error:
|
|
33
|
+
error: C
|
|
34
34
|
} = tt({
|
|
35
|
-
fetcher:
|
|
36
|
-
value:
|
|
37
|
-
allowEmptyQuery:
|
|
35
|
+
fetcher: g,
|
|
36
|
+
value: y,
|
|
37
|
+
allowEmptyQuery: V
|
|
38
38
|
}), {
|
|
39
|
-
avatars:
|
|
40
|
-
} =
|
|
41
|
-
fetchAvatarUrls:
|
|
39
|
+
avatars: T
|
|
40
|
+
} = U({
|
|
41
|
+
fetchAvatarUrls: w,
|
|
42
42
|
options: t
|
|
43
|
-
}),
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
47
|
-
|
|
43
|
+
}), u = X(), h = Y(/* @__PURE__ */ new Map()), D = K(() => `listbox-${u}`, [u]), e = i((o) => `${u}-option-${o.id}`, [u]), n = i((o) => {
|
|
44
|
+
const r = h.current.get(o);
|
|
45
|
+
if (r) {
|
|
46
|
+
if (I(o), c) {
|
|
47
|
+
r.focus();
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
r.scrollIntoView({
|
|
51
51
|
behavior: "smooth",
|
|
52
52
|
block: "nearest",
|
|
53
53
|
inline: "nearest"
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
}, [c]), l =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
e && f(e);
|
|
56
|
+
}, [c]), l = K(() => t.findIndex((o) => e(o) === s), [s, e, t]), p = i(() => {
|
|
57
|
+
N.current?.focus(), I(null);
|
|
58
|
+
}, [N]), x = i(() => {
|
|
59
|
+
if (s) {
|
|
60
|
+
const o = t.find((r) => e(r) === s);
|
|
61
|
+
o && a(o);
|
|
63
62
|
}
|
|
64
|
-
}, [
|
|
63
|
+
}, [a, s, e, t]), v = i(() => {
|
|
65
64
|
if (t.length === 0)
|
|
66
65
|
return;
|
|
67
66
|
if (l < t.length - 1) {
|
|
68
|
-
const
|
|
69
|
-
r
|
|
67
|
+
const r = e(t[l + 1]);
|
|
68
|
+
n(r);
|
|
70
69
|
return;
|
|
71
70
|
}
|
|
72
71
|
if (c) {
|
|
73
|
-
|
|
72
|
+
p();
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
}, [l,
|
|
75
|
+
const o = e(t[0]);
|
|
76
|
+
n(o);
|
|
77
|
+
}, [l, n, e, t, c, p]), O = i(() => {
|
|
79
78
|
if (t.length === 0)
|
|
80
79
|
return;
|
|
81
80
|
if (l > 0) {
|
|
82
|
-
const
|
|
83
|
-
r
|
|
81
|
+
const r = e(t[l - 1]);
|
|
82
|
+
n(r);
|
|
84
83
|
return;
|
|
85
84
|
}
|
|
86
85
|
if (c) {
|
|
87
|
-
|
|
86
|
+
p();
|
|
88
87
|
return;
|
|
89
88
|
}
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
}, [l,
|
|
89
|
+
const o = e(t[t.length - 1]);
|
|
90
|
+
n(o);
|
|
91
|
+
}, [l, n, e, t, c, p]), z = E({
|
|
93
92
|
isLoading: k,
|
|
94
|
-
error:
|
|
93
|
+
error: C,
|
|
95
94
|
isEmpty: j,
|
|
96
|
-
open:
|
|
97
|
-
selectNext:
|
|
98
|
-
selectPrevious:
|
|
99
|
-
selectItem:
|
|
100
|
-
}),
|
|
101
|
-
r
|
|
102
|
-
}, [
|
|
103
|
-
|
|
95
|
+
open: d,
|
|
96
|
+
selectNext: v,
|
|
97
|
+
selectPrevious: O,
|
|
98
|
+
selectItem: x
|
|
99
|
+
}), B = i((o, r) => {
|
|
100
|
+
n(r), a(o);
|
|
101
|
+
}, [n, a]);
|
|
102
|
+
Z(S, () => ({
|
|
104
103
|
focusFirstOption: () => {
|
|
105
|
-
t.length > 0 &&
|
|
104
|
+
t.length > 0 && n(e(t[0]));
|
|
106
105
|
},
|
|
107
106
|
focusLastOption: () => {
|
|
108
|
-
t.length > 0 &&
|
|
107
|
+
t.length > 0 && n(e(t[t.length - 1]));
|
|
109
108
|
},
|
|
110
|
-
selectNext:
|
|
111
|
-
selectPrevious:
|
|
112
|
-
selectItem:
|
|
113
|
-
}), [
|
|
114
|
-
t.length > 0 &&
|
|
115
|
-
}, [t,
|
|
116
|
-
const
|
|
117
|
-
fetchUsers:
|
|
118
|
-
fetchAvatarUrls:
|
|
119
|
-
onSelectedUserChange:
|
|
120
|
-
value:
|
|
121
|
-
avatars:
|
|
122
|
-
activeId:
|
|
123
|
-
setActiveId:
|
|
124
|
-
listboxId:
|
|
125
|
-
getOptionId:
|
|
109
|
+
selectNext: v,
|
|
110
|
+
selectPrevious: O,
|
|
111
|
+
selectItem: x
|
|
112
|
+
}), [n, e, t, v, O, x]), _(() => {
|
|
113
|
+
t.length > 0 && A && n(e(t[0]));
|
|
114
|
+
}, [t, d, e, n, A]);
|
|
115
|
+
const G = {
|
|
116
|
+
fetchUsers: g,
|
|
117
|
+
fetchAvatarUrls: w,
|
|
118
|
+
onSelectedUserChange: a,
|
|
119
|
+
value: y,
|
|
120
|
+
avatars: T,
|
|
121
|
+
activeId: s,
|
|
122
|
+
setActiveId: I,
|
|
123
|
+
listboxId: D,
|
|
124
|
+
getOptionId: e
|
|
126
125
|
};
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
value:
|
|
129
|
-
children: /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ f(ot.Provider, {
|
|
127
|
+
value: G,
|
|
128
|
+
children: /* @__PURE__ */ et(m.Root, {
|
|
130
129
|
modal: !1,
|
|
131
|
-
open:
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
-
children:
|
|
134
|
-
}), /* @__PURE__ */
|
|
135
|
-
...
|
|
130
|
+
open: d,
|
|
131
|
+
children: [/* @__PURE__ */ f(m.Anchor, {
|
|
132
|
+
children: R
|
|
133
|
+
}), /* @__PURE__ */ f(m.ContentContainer, {
|
|
134
|
+
...b,
|
|
136
135
|
align: "start",
|
|
137
|
-
className:
|
|
138
|
-
onOpenAutoFocus: (
|
|
139
|
-
|
|
136
|
+
className: J(M.popoverContainer, b?.className),
|
|
137
|
+
onOpenAutoFocus: (o) => {
|
|
138
|
+
o.preventDefault();
|
|
140
139
|
},
|
|
141
|
-
children: /* @__PURE__ */
|
|
142
|
-
"aria-activedescendant":
|
|
143
|
-
"aria-owns": Array.from(
|
|
144
|
-
"aria-roledescription":
|
|
145
|
-
className:
|
|
146
|
-
id:
|
|
147
|
-
onKeyDown:
|
|
140
|
+
children: /* @__PURE__ */ f(m.MainContent, {
|
|
141
|
+
"aria-activedescendant": s,
|
|
142
|
+
"aria-owns": Array.from(h.current.values()).map((o) => o.id).join(" "),
|
|
143
|
+
"aria-roledescription": P,
|
|
144
|
+
className: M.popoverContent,
|
|
145
|
+
id: D,
|
|
146
|
+
onKeyDown: z,
|
|
148
147
|
role: "listbox",
|
|
149
148
|
tabIndex: -1,
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
error:
|
|
152
|
-
handleInvite:
|
|
153
|
-
handleOptionClick:
|
|
149
|
+
children: /* @__PURE__ */ f(F, {
|
|
150
|
+
error: C,
|
|
151
|
+
handleInvite: q,
|
|
152
|
+
handleOptionClick: B,
|
|
154
153
|
isEmpty: j,
|
|
155
154
|
isLoading: k,
|
|
156
|
-
loadingAriaLabel:
|
|
157
|
-
optionRefs:
|
|
155
|
+
loadingAriaLabel: L,
|
|
156
|
+
optionRefs: h,
|
|
158
157
|
options: t,
|
|
159
|
-
renderEmpty:
|
|
160
|
-
renderError:
|
|
158
|
+
renderEmpty: H,
|
|
159
|
+
renderError: $
|
|
161
160
|
})
|
|
162
161
|
})
|
|
163
162
|
})]
|
|
@@ -165,5 +164,5 @@ const dt = /* @__PURE__ */ X(({
|
|
|
165
164
|
});
|
|
166
165
|
});
|
|
167
166
|
export {
|
|
168
|
-
|
|
167
|
+
mt as UserSelectorHeadless
|
|
169
168
|
};
|
|
@@ -1,114 +1,113 @@
|
|
|
1
|
-
import { Text as
|
|
1
|
+
import { Text as p, Tooltip as L, Combobox as x } from "@box/blueprint-web";
|
|
2
2
|
import { AvatarPlusBadge as b } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
import C, { forwardRef as d } from "react";
|
|
5
5
|
import { useIntl as v } from "react-intl";
|
|
6
6
|
import S from "./messages.js";
|
|
7
7
|
import { isUserContactType as O } from "./utils/isUserContactType.js";
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import '../../styles/user-selector-list-item.css';const U = "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
renderAvatar: l,
|
|
8
|
+
import { jsxs as _, jsx as r } from "react/jsx-runtime";
|
|
9
|
+
import '../../styles/user-selector-list-item.css';const U = "_userSelectorListItem_1m2q6_1", q = "_listItemAvatar_1m2q6_18", A = "_userInfo_1m2q6_21", g = "_title_1m2q6_28", E = "_userName_1m2q6_34", T = "_userEmail_1m2q6_35", k = "_userSelectorListItemInviteIcon_1m2q6_43", o = {
|
|
10
|
+
userSelectorListItem: U,
|
|
11
|
+
listItemAvatar: q,
|
|
12
|
+
userInfo: A,
|
|
13
|
+
title: g,
|
|
14
|
+
userName: E,
|
|
15
|
+
userEmail: T,
|
|
16
|
+
userSelectorListItemInviteIcon: k
|
|
17
|
+
}, y = /* @__PURE__ */ d(({
|
|
18
|
+
renderAvatar: c,
|
|
20
19
|
title: t,
|
|
21
|
-
subtitle:
|
|
22
|
-
onClick:
|
|
20
|
+
subtitle: m,
|
|
21
|
+
onClick: s,
|
|
23
22
|
className: e,
|
|
24
23
|
id: n,
|
|
25
24
|
selected: u,
|
|
26
|
-
isCollaborator:
|
|
27
|
-
...
|
|
25
|
+
isCollaborator: i = !0,
|
|
26
|
+
...l
|
|
28
27
|
}, I) => {
|
|
29
|
-
const
|
|
30
|
-
className:
|
|
28
|
+
const h = /* @__PURE__ */ C.cloneElement(c(), {
|
|
29
|
+
className: a(o.listItemAvatar)
|
|
31
30
|
}), {
|
|
32
|
-
formatMessage:
|
|
33
|
-
} = v(),
|
|
31
|
+
formatMessage: N
|
|
32
|
+
} = v(), f = /* @__PURE__ */ _("div", {
|
|
34
33
|
ref: I,
|
|
35
34
|
"aria-selected": u,
|
|
36
|
-
className:
|
|
35
|
+
className: a(o.userSelectorListItem, e),
|
|
37
36
|
id: n,
|
|
38
|
-
...
|
|
39
|
-
onClick:
|
|
37
|
+
...s ? {
|
|
38
|
+
onClick: s
|
|
40
39
|
} : {},
|
|
41
|
-
...
|
|
42
|
-
children: [
|
|
43
|
-
className:
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
className:
|
|
46
|
-
children: /* @__PURE__ */
|
|
40
|
+
...l,
|
|
41
|
+
children: [h, /* @__PURE__ */ _("div", {
|
|
42
|
+
className: a(o.userInfo),
|
|
43
|
+
children: [/* @__PURE__ */ r("div", {
|
|
44
|
+
className: a(o.title),
|
|
45
|
+
children: /* @__PURE__ */ r(p, {
|
|
47
46
|
as: "span",
|
|
48
|
-
className:
|
|
47
|
+
className: a(o.userName),
|
|
49
48
|
variant: "bodyDefaultSemibold",
|
|
50
49
|
children: t
|
|
51
50
|
})
|
|
52
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ r(p, {
|
|
53
52
|
as: "span",
|
|
54
|
-
className:
|
|
53
|
+
className: a(o.userEmail),
|
|
55
54
|
color: "textOnLightSecondary",
|
|
56
55
|
variant: "caption",
|
|
57
|
-
children:
|
|
56
|
+
children: m
|
|
58
57
|
})]
|
|
59
|
-
}), !
|
|
60
|
-
className:
|
|
58
|
+
}), !i && /* @__PURE__ */ r(b, {
|
|
59
|
+
className: o.userSelectorListItemInviteIcon
|
|
61
60
|
})]
|
|
62
61
|
});
|
|
63
|
-
return
|
|
64
|
-
content:
|
|
62
|
+
return i ? f : /* @__PURE__ */ r(L, {
|
|
63
|
+
content: N(S.inviteCollaboratorsTooltip),
|
|
65
64
|
side: "right",
|
|
66
|
-
children:
|
|
65
|
+
children: f
|
|
67
66
|
});
|
|
68
|
-
}),
|
|
69
|
-
renderAvatar:
|
|
67
|
+
}), j = /* @__PURE__ */ d(({
|
|
68
|
+
renderAvatar: c,
|
|
70
69
|
userContact: t,
|
|
71
|
-
onClick:
|
|
72
|
-
id:
|
|
70
|
+
onClick: m,
|
|
71
|
+
id: s,
|
|
73
72
|
...e
|
|
74
73
|
}, n) => {
|
|
75
|
-
const
|
|
74
|
+
const i = v().formatMessage(S.userName, {
|
|
76
75
|
name: t.name,
|
|
77
76
|
isCurrentUser: !!t.isCurrentUser
|
|
78
77
|
});
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ r(y, {
|
|
80
79
|
ref: n,
|
|
81
|
-
id:
|
|
80
|
+
id: s,
|
|
82
81
|
onClick: () => {
|
|
83
|
-
|
|
82
|
+
m?.(t, s);
|
|
84
83
|
},
|
|
85
|
-
renderAvatar: () =>
|
|
84
|
+
renderAvatar: () => c(t),
|
|
86
85
|
subtitle: t.email,
|
|
87
|
-
title:
|
|
86
|
+
title: i,
|
|
88
87
|
...e
|
|
89
88
|
});
|
|
90
|
-
}),
|
|
89
|
+
}), G = /* @__PURE__ */ d(function(t, m) {
|
|
91
90
|
const {
|
|
92
|
-
className:
|
|
91
|
+
className: s,
|
|
93
92
|
userContact: e,
|
|
94
93
|
renderAvatar: n,
|
|
95
94
|
renderCustomOption: u,
|
|
96
|
-
...
|
|
97
|
-
} = t,
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
ref:
|
|
100
|
-
className:
|
|
95
|
+
...i
|
|
96
|
+
} = t, l = O(e), I = l ? !0 : e.hideOnClick ?? !0;
|
|
97
|
+
return /* @__PURE__ */ r(x.Option, {
|
|
98
|
+
ref: m,
|
|
99
|
+
className: s,
|
|
101
100
|
hideOnClick: I,
|
|
102
101
|
value: e.value,
|
|
103
|
-
...
|
|
104
|
-
children:
|
|
102
|
+
...i,
|
|
103
|
+
children: l ? /* @__PURE__ */ r(j, {
|
|
105
104
|
renderAvatar: n,
|
|
106
105
|
userContact: e
|
|
107
106
|
}) : u(e, () => n(e))
|
|
108
107
|
});
|
|
109
108
|
});
|
|
110
109
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
G as UserSelectorComboboxOption,
|
|
111
|
+
j as UserSelectorListItem,
|
|
112
|
+
y as UserSelectorListItemInfo
|
|
114
113
|
};
|
package/dist/i18n/en-x-pseudo.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
"groupSharedFeatures.userSelector.emptyMessage": "⟦萬萬萬萬萬萬
|
|
3
|
-
"groupSharedFeatures.userSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬
|
|
4
|
-
"groupSharedFeatures.userSelector.errorMessageDescription": "⟦萬萬萬萬萬萬
|
|
5
|
-
"groupSharedFeatures.userSelector.inviteCollaborators": "⟦萬萬萬萬萬
|
|
6
|
-
"groupSharedFeatures.userSelector.inviteCollaboratorsTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬
|
|
7
|
-
"groupSharedFeatures.userSelector.loading": "⟦萬萬
|
|
8
|
-
"groupSharedFeatures.userSelector.noResults": "⟦萬萬
|
|
9
|
-
"groupSharedFeatures.userSelector.tryAgain": "⟦萬萬
|
|
10
|
-
"groupSharedFeatures.userSelector.userAvatar": "⟦萬萬萬
|
|
11
|
-
"groupSharedFeatures.userSelector.userName": "⟦萬萬萬萬萬萬萬 {name} {isCurrentUser, select, true { (
|
|
2
|
+
"groupSharedFeatures.userSelector.emptyMessage": "⟦萬萬萬萬萬萬 Йο ćŏļĺăвőѓąτояŝ ƒόůʼnď 國國國國國國⟧",
|
|
3
|
+
"groupSharedFeatures.userSelector.errorMessage": "⟦萬萬萬萬萬萬萬萬 Щё ώεřė ûʼnäвļе ťο ĺöάď ųşеѓş 國國國國國國國國⟧",
|
|
4
|
+
"groupSharedFeatures.userSelector.errorMessageDescription": "⟦萬萬萬萬萬萬 Pľĕåŝę ŧгÿ àġăĭŋ ľáţεґ 國國國國國國⟧",
|
|
5
|
+
"groupSharedFeatures.userSelector.inviteCollaborators": "⟦萬萬萬萬萬 Īʼnνίţē Çοľĺáвöяàŧσѓŝ 國國國國國⟧",
|
|
6
|
+
"groupSharedFeatures.userSelector.inviteCollaboratorsTooltip": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 Τĥϊѕ Ρëґśόņ ďòêşń'ŧ нąνё äććĕѕŝ ǻлď ẁση'ť вē ŋóťìƒïёď ũлľεŝŝ ĩʼnνĭťεď. 國國國國國國國國國國國國國國國國國國國國⟧",
|
|
7
|
+
"groupSharedFeatures.userSelector.loading": "⟦萬萬 Ŀоǻďíňġ 國國⟧",
|
|
8
|
+
"groupSharedFeatures.userSelector.noResults": "⟦萬萬 Иο ґĕŝūľţş 國國⟧",
|
|
9
|
+
"groupSharedFeatures.userSelector.tryAgain": "⟦萬萬 Ŧѓў ąĝǻïň 國國⟧",
|
|
10
|
+
"groupSharedFeatures.userSelector.userAvatar": "⟦萬萬萬 Úŝéг àνǻťάŕ 國國國⟧",
|
|
11
|
+
"groupSharedFeatures.userSelector.userName": "⟦萬萬萬萬萬萬萬 {name} {isCurrentUser, select, true { (mё)} other {}} 國國國國國國國⟧"
|
|
12
12
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Text displayed when no results are found
|
|
2
|
-
groupSharedFeatures.userSelector.emptyMessage = ⟦萬萬萬萬萬萬
|
|
2
|
+
groupSharedFeatures.userSelector.emptyMessage = ⟦萬萬萬萬萬萬 Йο ćŏļĺăвőѓąτояŝ ƒόůʼnď 國國國國國國⟧
|
|
3
3
|
# Text displayed when an error occurs
|
|
4
|
-
groupSharedFeatures.userSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬
|
|
4
|
+
groupSharedFeatures.userSelector.errorMessage = ⟦萬萬萬萬萬萬萬萬 Щё ώεřė ûʼnäвļе ťο ĺöάď ųşеѓş 國國國國國國國國⟧
|
|
5
5
|
# Text displayed when an error occurs
|
|
6
|
-
groupSharedFeatures.userSelector.errorMessageDescription = ⟦萬萬萬萬萬萬
|
|
6
|
+
groupSharedFeatures.userSelector.errorMessageDescription = ⟦萬萬萬萬萬萬 Pľĕåŝę ŧгÿ àġăĭŋ ľáţεґ 國國國國國國⟧
|
|
7
7
|
# Text displayed when no results are found and the user can invite collaborators
|
|
8
|
-
groupSharedFeatures.userSelector.inviteCollaborators = ⟦萬萬萬萬萬
|
|
8
|
+
groupSharedFeatures.userSelector.inviteCollaborators = ⟦萬萬萬萬萬 Īʼnνίţē Çοľĺáвöяàŧσѓŝ 國國國國國⟧
|
|
9
9
|
# Tooltip text displayed when a user is not a collaborator
|
|
10
|
-
groupSharedFeatures.userSelector.inviteCollaboratorsTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬
|
|
10
|
+
groupSharedFeatures.userSelector.inviteCollaboratorsTooltip = ⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 Τĥϊѕ Ρëґśόņ ďòêşń'ŧ нąνё äććĕѕŝ ǻлď ẁση'ť вē ŋóťìƒïёď ũлľεŝŝ ĩʼnνĭťεď. 國國國國國國國國國國國國國國國國國國國國⟧
|
|
11
11
|
# Aria label for loading indicator
|
|
12
|
-
groupSharedFeatures.userSelector.loading = ⟦萬萬
|
|
12
|
+
groupSharedFeatures.userSelector.loading = ⟦萬萬 Ŀоǻďíňġ 國國⟧
|
|
13
13
|
# Text displayed when no results are found
|
|
14
|
-
groupSharedFeatures.userSelector.noResults = ⟦萬萬
|
|
14
|
+
groupSharedFeatures.userSelector.noResults = ⟦萬萬 Иο ґĕŝūľţş 國國⟧
|
|
15
15
|
# Text for the "Try again" button
|
|
16
|
-
groupSharedFeatures.userSelector.tryAgain = ⟦萬萬
|
|
16
|
+
groupSharedFeatures.userSelector.tryAgain = ⟦萬萬 Ŧѓў ąĝǻïň 國國⟧
|
|
17
17
|
# Alt text for user avatar image
|
|
18
|
-
groupSharedFeatures.userSelector.userAvatar = ⟦萬萬萬
|
|
18
|
+
groupSharedFeatures.userSelector.userAvatar = ⟦萬萬萬 Úŝéг àνǻťάŕ 國國國⟧
|
|
19
19
|
# User name with optional "me" marker for current user
|
|
20
|
-
groupSharedFeatures.userSelector.userName = ⟦萬萬萬萬萬萬萬 {name} {isCurrentUser, select, true { (
|
|
20
|
+
groupSharedFeatures.userSelector.userName = ⟦萬萬萬萬萬萬萬 {name} {isCurrentUser, select, true { (mё)} other {}} 國國國國國國國⟧
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/user-selector",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@box/blueprint-web": "^
|
|
6
|
-
"@box/blueprint-web-assets": "^4.
|
|
7
|
-
"@box/combobox-with-api": "^
|
|
5
|
+
"@box/blueprint-web": "^12.103.3",
|
|
6
|
+
"@box/blueprint-web-assets": "^4.86.3",
|
|
7
|
+
"@box/combobox-with-api": "^1.16.0",
|
|
8
8
|
"lodash": "^4.17.15",
|
|
9
9
|
"react": "^17.0.0 || ^18.0.0",
|
|
10
10
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
11
11
|
"react-intl": "6.4.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@box/blueprint-web": "^12.103.
|
|
15
|
-
"@box/blueprint-web-assets": "^4.86.
|
|
16
|
-
"@box/combobox-with-api": "^1.
|
|
17
|
-
"@box/storybook-utils": "^0.14.
|
|
14
|
+
"@box/blueprint-web": "^12.103.3",
|
|
15
|
+
"@box/blueprint-web-assets": "^4.86.3",
|
|
16
|
+
"@box/combobox-with-api": "^1.16.0",
|
|
17
|
+
"@box/storybook-utils": "^0.14.24",
|
|
18
18
|
"@types/lodash": "^4.17.14",
|
|
19
19
|
"react": "^18.3.0",
|
|
20
20
|
"react-dom": "^18.3.0",
|