@swan-io/lake 11.3.5 → 11.4.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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/lake",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"engines": {
|
|
5
|
-
"node": "
|
|
5
|
+
"node": "^22.12.0",
|
|
6
6
|
"pnpm": "^10.2.0"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-three/drei": "^9.121.
|
|
29
|
+
"@react-three/drei": "^9.121.5",
|
|
30
30
|
"@react-three/fiber": "^8.17.14",
|
|
31
31
|
"@swan-io/boxed": "^3.2.0",
|
|
32
32
|
"@swan-io/chicane": "^2.1.0",
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"@types/react-native": "^0.72.8",
|
|
50
50
|
"@types/three": "^0.173.0",
|
|
51
51
|
"jsdom": "^26.0.0",
|
|
52
|
-
"type-fest": "^4.
|
|
52
|
+
"type-fest": "^4.35.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/src/assets/main.css
CHANGED
|
@@ -318,9 +318,9 @@ body {
|
|
|
318
318
|
|
|
319
319
|
--focus-ring-color: #0019fe;
|
|
320
320
|
|
|
321
|
-
--font-family-primary:
|
|
322
|
-
|
|
323
|
-
sans-serif;
|
|
321
|
+
--font-family-primary:
|
|
322
|
+
Inter, -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
|
|
323
|
+
Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji, sans-serif;
|
|
324
324
|
--font-family-card-font: "Inter Card", monospace;
|
|
325
325
|
--font-family-code: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
|
326
326
|
--font-family-iban: "Roboto Mono", monospace;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const FilterChooser: <FilterName extends string>({ filters, openFilters, label, title, availableFilters, large, onAddFilter, }: {
|
|
2
2
|
filters: Partial<Record<FilterName, unknown>>;
|
|
3
3
|
openFilters: FilterName[];
|
|
4
4
|
label: string;
|
|
@@ -9,4 +9,4 @@ export declare function FilterChooser<FilterName extends string>({ filters, open
|
|
|
9
9
|
}[];
|
|
10
10
|
large?: boolean;
|
|
11
11
|
onAddFilter: (filterName: FilterName) => void;
|
|
12
|
-
})
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,6 @@ import { Pressable, StyleSheet, View } from "react-native";
|
|
|
4
4
|
import { colors } from "../constants/design";
|
|
5
5
|
import { useDisclosure } from "../hooks/useDisclosure";
|
|
6
6
|
import { isNotNullishOrEmpty } from "../utils/nullish";
|
|
7
|
-
import { Box } from "./Box";
|
|
8
7
|
import { FlatList } from "./FlatList";
|
|
9
8
|
import { Icon } from "./Icon";
|
|
10
9
|
import { LakeButton } from "./LakeButton";
|
|
@@ -36,14 +35,14 @@ const styles = StyleSheet.create({
|
|
|
36
35
|
paddingHorizontal: 24,
|
|
37
36
|
},
|
|
38
37
|
});
|
|
39
|
-
export
|
|
38
|
+
export const FilterChooser = ({ filters, openFilters, label, title, availableFilters, large = true, onAddFilter, }) => {
|
|
40
39
|
const inputRef = useRef(null);
|
|
41
40
|
const [visible, { close, toggle }] = useDisclosure(false);
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(LakeButton, { size: "small", mode: "secondary", color: "gray", onPress: toggle, ref: inputRef, icon: large ? "chevron-down-filled" : "filter-filled", iconPosition: "end", ariaLabel: label, children: large ? label : null }), _jsx(Popover, { role: "listbox", matchReferenceMinWidth: true, onDismiss: close, referenceRef: inputRef, returnFocus: false, visible: visible, children: _jsxs(View, { style: styles.list, children: [isNotNullishOrEmpty(title) ? (_jsxs(_Fragment, { children: [_jsx(LakeText, { style: styles.availableFiltersTitle, children: title }), _jsx(Space, { height: 8 })] })) : null, _jsx(FlatList, { role: "list", data: availableFilters, keyExtractor: (_, index) => `filter-item-${index}`, renderItem: ({ item }) => {
|
|
43
42
|
const isSet = Boolean(filters[item.name]) || openFilters.includes(item.name);
|
|
44
43
|
return (_jsxs(Pressable, { style: ({ hovered }) => [styles.item, hovered && styles.itemHovered], role: "button", disabled: isSet, onPress: () => {
|
|
45
44
|
onAddFilter(item.name);
|
|
46
45
|
close();
|
|
47
46
|
}, children: [_jsx(LakeText, { variant: "smallRegular", style: isSet && styles.selected, children: item.label }), isSet && _jsx(Icon, { color: colors.positive[500], name: "checkmark-filled", size: 14 })] }));
|
|
48
47
|
} })] }) })] }));
|
|
49
|
-
}
|
|
48
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MutableRefObject,
|
|
1
|
+
import { MutableRefObject, ReactNode } from "react";
|
|
2
2
|
import { ViewProps } from "react-native";
|
|
3
3
|
import { ColorVariants } from "../constants/design";
|
|
4
4
|
type Props = {
|
|
5
5
|
variant?: ColorVariants;
|
|
6
6
|
style?: ViewProps["style"];
|
|
7
|
-
children:
|
|
7
|
+
children: ReactNode;
|
|
8
8
|
};
|
|
9
9
|
export declare const CurrentColorContext: import("react").Context<"gray" | "live" | "sandbox" | "positive" | "warning" | "negative" | "current" | "partner" | "swan" | "shakespear" | "darkPink" | "sunglow" | "mediumSladeBlue" | undefined>;
|
|
10
10
|
export declare const useCurrentColor: (containerRef: MutableRefObject<HTMLElement | null>, variant: ColorVariants | undefined) => void;
|