@swan-io/lake 11.3.3 → 11.3.5
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/lake",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.5",
|
|
4
4
|
"engines": {
|
|
5
|
-
"node": ">=
|
|
6
|
-
"pnpm": "^
|
|
5
|
+
"node": ">=22.12.0",
|
|
6
|
+
"pnpm": "^10.2.0"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"LICENSE",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-three/drei": "^9.121.
|
|
30
|
-
"@react-three/fiber": "^8.17.
|
|
29
|
+
"@react-three/drei": "^9.121.4",
|
|
30
|
+
"@react-three/fiber": "^8.17.14",
|
|
31
31
|
"@swan-io/boxed": "^3.2.0",
|
|
32
32
|
"@swan-io/chicane": "^2.1.0",
|
|
33
33
|
"@swan-io/use-form": "^3.1.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"react-dom": "^18.3.1",
|
|
39
39
|
"react-native-web": "^0.19.13",
|
|
40
40
|
"rifm": "^0.12.1",
|
|
41
|
-
"three": "^0.
|
|
41
|
+
"three": "^0.173.0",
|
|
42
42
|
"ts-dedent": "^2.2.0",
|
|
43
|
-
"ts-pattern": "^5.6.
|
|
43
|
+
"ts-pattern": "^5.6.2",
|
|
44
44
|
"uuid": "^11.0.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/react": "^18.3.12",
|
|
48
48
|
"@types/react-dom": "^18.3.1",
|
|
49
49
|
"@types/react-native": "^0.72.8",
|
|
50
|
-
"@types/three": "^0.
|
|
50
|
+
"@types/three": "^0.173.0",
|
|
51
51
|
"jsdom": "^26.0.0",
|
|
52
|
-
"type-fest": "^4.
|
|
52
|
+
"type-fest": "^4.33.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { IconName } from "./Icon";
|
|
2
3
|
import { SpacingValue } from "./Space";
|
|
3
4
|
export declare const tabsViewHeight: number;
|
|
@@ -8,6 +9,7 @@ type Tab = ({
|
|
|
8
9
|
}) & {
|
|
9
10
|
count?: number;
|
|
10
11
|
icon?: IconName;
|
|
12
|
+
endElement?: ReactNode;
|
|
11
13
|
label: string;
|
|
12
14
|
withSeparator?: boolean;
|
|
13
15
|
};
|
|
@@ -407,7 +407,7 @@ export const TabView = ({ tabs, otherLabel, hideIfSingleItem = true, sticky = fa
|
|
|
407
407
|
return null;
|
|
408
408
|
}
|
|
409
409
|
return (_jsxs(Box, { alignItems: "center", direction: "row", role: "tablist", ref: containerRef, style: [styles.container, sticky && styles.sticky, { paddingHorizontal: padding }], children: [_jsxs(View, { style: styles.placeholder, "aria-hidden": true, ref: placeholderRef, onLayout: onLayout, children: [tabs.map(tab => {
|
|
410
|
-
const { label, icon, count } = tab;
|
|
410
|
+
const { label, icon, count, endElement } = tab;
|
|
411
411
|
const tabId = getTabId(tab);
|
|
412
412
|
return (_jsxs(Fragment, { children: [_jsxs(TabViewLink, { ref: ref => {
|
|
413
413
|
if (placeholderLinkRef.current) {
|
|
@@ -416,9 +416,9 @@ export const TabView = ({ tabs, otherLabel, hideIfSingleItem = true, sticky = fa
|
|
|
416
416
|
}, activeTabId: activeTabId, tab: tab, onChange: onChange, style: ({ active, hovered }) => [
|
|
417
417
|
styles.link,
|
|
418
418
|
active ? styles.activeLink : hovered ? styles.hoveredLink : null,
|
|
419
|
-
], children: [isNotNullish(icon) && (_jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: 16, color: "currentColor" }), _jsx(Space, { width: 8 })] })), _jsx(Text, { children: label }), count != null ? (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), _jsx(Text, { style: styles.count, children: count })] })) : null] }), _jsx(Space, { width: 32 })] }, tabId));
|
|
419
|
+
], children: [isNotNullish(icon) && (_jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: 16, color: "currentColor" }), _jsx(Space, { width: 8 })] })), _jsx(Text, { children: label }), isNotNullish(endElement) && (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), endElement] })), count != null ? (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), _jsx(Text, { style: styles.count, children: count })] })) : null] }), _jsx(Space, { width: 32 })] }, tabId));
|
|
420
420
|
}), _jsxs(LakeText, { ref: otherPlaceholderRef, style: styles.link, children: [_jsx(Text, { children: otherLabel }), _jsx(Space, { width: 8 }), _jsx(Text, { style: styles.count, children: tabs.length }), _jsx(Space, { width: 4 }), _jsx(Icon, { name: "chevron-down-filled", size: 12 })] })] }), kept.map(tab => {
|
|
421
|
-
const { label, icon, withSeparator, count } = tab;
|
|
421
|
+
const { label, icon, withSeparator, count, endElement } = tab;
|
|
422
422
|
const tabId = getTabId(tab);
|
|
423
423
|
return (_jsxs(Fragment, { children: [_jsxs(TabViewLink, { ref: ref => {
|
|
424
424
|
if (linksRefs.current) {
|
|
@@ -427,7 +427,7 @@ export const TabView = ({ tabs, otherLabel, hideIfSingleItem = true, sticky = fa
|
|
|
427
427
|
}, onChange: onChange, activeTabId: activeTabId, tab: tab, role: "tab", style: ({ active, hovered }) => [
|
|
428
428
|
styles.link,
|
|
429
429
|
active ? styles.activeLink : hovered ? styles.hoveredLink : null,
|
|
430
|
-
], children: [withSeparator === true && _jsx(View, { style: styles.separator, role: "none" }), isNotNullish(icon) && (_jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: 16, color: "currentColor" }), _jsx(Space, { width: 8 })] })), _jsx(Text, { children: label }), count != null ? (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), _jsx(Text, { style: styles.count, children: count })] })) : null] }), _jsx(Space, { width: 32 })] }, tabId));
|
|
430
|
+
], children: [withSeparator === true && _jsx(View, { style: styles.separator, role: "none" }), isNotNullish(icon) && (_jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: 16, color: "currentColor" }), _jsx(Space, { width: 8 })] })), _jsx(Text, { children: label }), isNotNullish(endElement) && (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), endElement] })), count != null ? (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), _jsx(Text, { style: styles.count, children: count })] })) : null] }), _jsx(Space, { width: 32 })] }, tabId));
|
|
431
431
|
}), collapsed.length > 0 ? (_jsx(DropdownItems, { ref: ref => {
|
|
432
432
|
collapsed.forEach(item => {
|
|
433
433
|
if (linksRefs.current) {
|