@jetbrains/ring-ui-built 7.0.22 → 7.0.23
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/components/_helpers/avatar-info.js +33 -0
- package/components/_helpers/card.js +3 -1
- package/components/avatar/avatar-info.d.ts +8 -0
- package/components/avatar/avatar-info.js +4 -0
- package/components/avatar/avatar-size.d.ts +16 -0
- package/components/avatar/avatar-size.js +19 -0
- package/components/avatar/avatar.d.ts +4 -16
- package/components/avatar/avatar.figma.js +3 -1
- package/components/avatar/avatar.js +14 -26
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +208 -36
- package/components/avatar-stack/avatar-stack.js +3 -1
- package/components/dropdown-menu/dropdown-menu.js +2 -0
- package/components/header/header.js +2 -0
- package/components/header/profile.js +3 -1
- package/components/header/smart-profile.js +2 -0
- package/components/list/list.js +2 -0
- package/components/list/list__item.js +3 -1
- package/components/list/list__users-groups-source.js +2 -0
- package/components/pager/pager.js +2 -0
- package/components/popup-menu/popup-menu.js +2 -0
- package/components/query-assist/query-assist.js +2 -0
- package/components/query-assist/query-assist__suggestions.js +2 -0
- package/components/select/select.js +3 -1
- package/components/select/select__filter.js +2 -0
- package/components/select/select__popup.js +2 -0
- package/components/style.css +1 -1
- package/components/tabs/collapsible-more.js +2 -0
- package/components/tabs/collapsible-tabs.d.ts +3 -2
- package/components/tabs/collapsible-tabs.js +8 -3
- package/components/tabs/dumb-tabs.d.ts +1 -0
- package/components/tabs/dumb-tabs.js +2 -0
- package/components/tabs/smart-tabs.js +2 -0
- package/components/tabs/tabs.js +2 -0
- package/components/tags-input/tags-input.js +2 -0
- package/components/user-card/card.js +2 -0
- package/components/user-card/smart-user-card-tooltip.js +2 -0
- package/components/user-card/tooltip.js +2 -0
- package/components/user-card/user-card.js +2 -0
- package/package.json +1 -1
- package/components/avatar/avatar-example-datauri.d.ts +0 -1
- package/components/avatar/avatar-example-datauri.js +0 -4
@@ -48,6 +48,8 @@ import '../_helpers/list.js';
|
|
48
48
|
import '../list/list__item.js';
|
49
49
|
import '../avatar/avatar.js';
|
50
50
|
import '../global/url.js';
|
51
|
+
import '../_helpers/avatar-info.js';
|
52
|
+
import '../avatar/avatar-size.js';
|
51
53
|
import '../avatar/fallback-avatar.js';
|
52
54
|
import '../checkbox/checkbox.js';
|
53
55
|
import '@jetbrains/icons/checkmark-12px';
|
@@ -4,6 +4,7 @@ export interface CollapsibleTabsProps {
|
|
4
4
|
children: ReactElement<TabProps>[];
|
5
5
|
selected?: string | undefined;
|
6
6
|
onSelect?: ((key: string) => () => void) | undefined;
|
7
|
+
onLastVisibleIndexChange?: ((index: number) => void) | null | undefined;
|
7
8
|
moreClassName?: string | null | undefined;
|
8
9
|
moreActiveClassName?: string | null | undefined;
|
9
10
|
morePopupClassName?: string | null | undefined;
|
@@ -11,6 +12,6 @@ export interface CollapsibleTabsProps {
|
|
11
12
|
initialVisibleItems?: number | null | undefined;
|
12
13
|
morePopupBeforeEnd?: ReactNode;
|
13
14
|
}
|
14
|
-
export declare const CollapsibleTabs: ({ children, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems, }: CollapsibleTabsProps) => import("react/jsx-runtime").JSX.Element;
|
15
|
-
declare const _default: import("react").MemoExoticComponent<({ children, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems, }: CollapsibleTabsProps) => import("react/jsx-runtime").JSX.Element>;
|
15
|
+
export declare const CollapsibleTabs: ({ children, selected, onSelect, onLastVisibleIndexChange, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems, }: CollapsibleTabsProps) => import("react/jsx-runtime").JSX.Element;
|
16
|
+
declare const _default: import("react").MemoExoticComponent<({ children, selected, onSelect, onLastVisibleIndexChange, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems, }: CollapsibleTabsProps) => import("react/jsx-runtime").JSX.Element>;
|
16
17
|
export default _default;
|
@@ -47,6 +47,8 @@ import '../_helpers/list.js';
|
|
47
47
|
import '../list/list__item.js';
|
48
48
|
import '../avatar/avatar.js';
|
49
49
|
import '../global/url.js';
|
50
|
+
import '../_helpers/avatar-info.js';
|
51
|
+
import '../avatar/avatar-size.js';
|
50
52
|
import '../avatar/fallback-avatar.js';
|
51
53
|
import '../checkbox/checkbox.js';
|
52
54
|
import '@jetbrains/icons/checkmark-12px';
|
@@ -78,6 +80,7 @@ const CollapsibleTabs = _ref => {
|
|
78
80
|
children,
|
79
81
|
selected,
|
80
82
|
onSelect,
|
83
|
+
onLastVisibleIndexChange,
|
81
84
|
moreClassName,
|
82
85
|
moreActiveClassName,
|
83
86
|
morePopupClassName,
|
@@ -157,10 +160,12 @@ const CollapsibleTabs = _ref => {
|
|
157
160
|
}
|
158
161
|
}
|
159
162
|
}
|
160
|
-
|
161
|
-
|
163
|
+
const newLastVisibleIndex = tabsToRender.length - 1;
|
164
|
+
if (elements.lastVisibleIndex !== newLastVisibleIndex) {
|
165
|
+
setLastVisibleIndex(newLastVisibleIndex);
|
166
|
+
onLastVisibleIndexChange === null || onLastVisibleIndexChange === undefined || onLastVisibleIndexChange(newLastVisibleIndex);
|
162
167
|
}
|
163
|
-
}, [children, elements.lastVisibleIndex, elements.sizes, selectedIndex]);
|
168
|
+
}, [children, elements.lastVisibleIndex, elements.sizes, onLastVisibleIndexChange, selectedIndex]);
|
164
169
|
// Prepare list of visible and hidden elements
|
165
170
|
useEffect(() => {
|
166
171
|
const timeout = setTimeout(() => {
|
@@ -8,6 +8,7 @@ export type Children = readonly (Children | null | boolean)[] | ReactElement<Tab
|
|
8
8
|
export interface TabsProps extends Omit<CollapsibleTabsProps, 'onSelect' | 'children'> {
|
9
9
|
children: Children;
|
10
10
|
onSelect?: ((key: string) => void) | null | undefined;
|
11
|
+
onLastVisibleIndexChange?: ((index: number) => void) | null | undefined;
|
11
12
|
className?: string | null | undefined;
|
12
13
|
tabContainerClassName?: string | null | undefined;
|
13
14
|
autoCollapse?: boolean | null | undefined;
|
@@ -49,6 +49,8 @@ import '../_helpers/list.js';
|
|
49
49
|
import '../list/list__item.js';
|
50
50
|
import '../avatar/avatar.js';
|
51
51
|
import '../global/url.js';
|
52
|
+
import '../_helpers/avatar-info.js';
|
53
|
+
import '../avatar/avatar-size.js';
|
52
54
|
import '../avatar/fallback-avatar.js';
|
53
55
|
import '../checkbox/checkbox.js';
|
54
56
|
import '@jetbrains/icons/checkmark-12px';
|
@@ -48,6 +48,8 @@ import '../_helpers/list.js';
|
|
48
48
|
import '../list/list__item.js';
|
49
49
|
import '../avatar/avatar.js';
|
50
50
|
import '../global/url.js';
|
51
|
+
import '../_helpers/avatar-info.js';
|
52
|
+
import '../avatar/avatar-size.js';
|
51
53
|
import '../avatar/fallback-avatar.js';
|
52
54
|
import '../checkbox/checkbox.js';
|
53
55
|
import '@jetbrains/icons/checkmark-12px';
|
package/components/tabs/tabs.js
CHANGED
@@ -51,6 +51,8 @@ import '../_helpers/list.js';
|
|
51
51
|
import '../list/list__item.js';
|
52
52
|
import '../avatar/avatar.js';
|
53
53
|
import '../global/url.js';
|
54
|
+
import '../_helpers/avatar-info.js';
|
55
|
+
import '../avatar/avatar-size.js';
|
54
56
|
import '../avatar/fallback-avatar.js';
|
55
57
|
import '../checkbox/checkbox.js';
|
56
58
|
import '@jetbrains/icons/checkmark-12px';
|
@@ -34,6 +34,8 @@ import '../_helpers/button__classes.js';
|
|
34
34
|
import '../avatar/avatar.js';
|
35
35
|
import '../global/url.js';
|
36
36
|
import '../global/dom.js';
|
37
|
+
import '../_helpers/avatar-info.js';
|
38
|
+
import '../avatar/avatar-size.js';
|
37
39
|
import '../avatar/fallback-avatar.js';
|
38
40
|
import '../popup/popup.js';
|
39
41
|
import 'react-dom';
|
@@ -12,6 +12,7 @@ import '../icon/icon.js';
|
|
12
12
|
import '../i18n/i18n-context.js';
|
13
13
|
import '../tooltip/tooltip.js';
|
14
14
|
export { U as default } from '../_helpers/card.js';
|
15
|
+
import '../avatar/avatar-size.js';
|
15
16
|
import '../icon/icon__constants.js';
|
16
17
|
import 'util-deprecate';
|
17
18
|
import '../global/url.js';
|
@@ -19,6 +20,7 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
19
20
|
import 'core-js/modules/es.string.replace.js';
|
20
21
|
import '../global/dom.js';
|
21
22
|
import '../global/memoize.js';
|
23
|
+
import '../_helpers/avatar-info.js';
|
22
24
|
import '../avatar/fallback-avatar.js';
|
23
25
|
import '../global/get-uid.js';
|
24
26
|
import '../global/data-tests.js';
|
@@ -41,6 +41,8 @@ import '../popup/popup.target.js';
|
|
41
41
|
import '@jetbrains/icons/copy';
|
42
42
|
import '../avatar/avatar.js';
|
43
43
|
import '../global/url.js';
|
44
|
+
import '../_helpers/avatar-info.js';
|
45
|
+
import '../avatar/avatar-size.js';
|
44
46
|
import '../avatar/fallback-avatar.js';
|
45
47
|
import '../link/link.js';
|
46
48
|
import '../_helpers/link.js';
|
@@ -39,6 +39,8 @@ import '../popup/popup.target.js';
|
|
39
39
|
import '@jetbrains/icons/copy';
|
40
40
|
import '../avatar/avatar.js';
|
41
41
|
import '../global/url.js';
|
42
|
+
import '../_helpers/avatar-info.js';
|
43
|
+
import '../avatar/avatar-size.js';
|
42
44
|
import '../avatar/fallback-avatar.js';
|
43
45
|
import '../link/link.js';
|
44
46
|
import '../_helpers/link.js';
|
@@ -14,6 +14,8 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
14
14
|
import 'core-js/modules/es.string.replace.js';
|
15
15
|
import '../global/dom.js';
|
16
16
|
import '../global/memoize.js';
|
17
|
+
import '../_helpers/avatar-info.js';
|
18
|
+
import '../avatar/avatar-size.js';
|
17
19
|
import '../avatar/fallback-avatar.js';
|
18
20
|
import '../global/get-uid.js';
|
19
21
|
import '../link/link.js';
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const avatarDataUri: string;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
// Taken from https://hub.jetbrains.com/api/rest/avatar/default?username=Jet%20Brains&dpr=2&size=56
|
2
|
-
const avatarDataUri = "data:image/svg+xml,".concat(encodeURIComponent("\n<svg viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <linearGradient id=\"gradient\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop stop-color=\"#D50F6B\" offset=\"0\"/>\n <stop stop-color=\"#E73AE8\" offset=\"1\"/>\n </linearGradient>\n </defs>\n <g>\n <rect fill=\"url(#gradient)\"\n x=\"0\" y=\"0\" width=\"40\" height=\"40\"\n rx=\"3\" ry=\"3\"/>\n <text x=\"5\" y=\"19\"\n font-family=\"Arial, Helvetica, sans-serif\"\n font-size=\"15px\"\n letter-spacing=\"1\"\n fill=\"#FFFFFF\">\n <tspan>JB</tspan>\n <tspan x=\"6\" y=\"28\">_</tspan>\n </text>\n </g>\n</svg>\n"));
|
3
|
-
|
4
|
-
export { avatarDataUri };
|