@swan-io/lake 4.0.0 → 4.0.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/lake",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -27,13 +27,13 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@popperjs/core": "^2.11.8",
30
- "@react-three/drei": "^9.88.11",
31
- "@react-three/fiber": "^8.15.10",
30
+ "@react-three/drei": "^9.88.17",
31
+ "@react-three/fiber": "^8.15.11",
32
32
  "@swan-io/boxed": "^1.2.0",
33
33
  "@swan-io/chicane": "^1.4.1",
34
34
  "dayjs": "^1.11.10",
35
35
  "polished": "^4.2.2",
36
- "prism-react-renderer": "^2.1.0",
36
+ "prism-react-renderer": "^2.3.0",
37
37
  "react": "^18.2.0",
38
38
  "react-atomic-state": "^1.2.7",
39
39
  "react-dom": "^18.2.0",
@@ -44,16 +44,16 @@
44
44
  "three": "^0.158.0",
45
45
  "ts-dedent": "^2.2.0",
46
46
  "ts-pattern": "^5.0.5",
47
- "urql": "^4.0.5",
47
+ "urql": "^4.0.6",
48
48
  "uuid": "^9.0.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/react": "^18.2.36",
52
- "@types/react-dom": "^18.2.14",
53
- "@types/react-native": "^0.72.5",
54
- "@types/three": "^0.158.1",
55
- "@types/uuid": "^9.0.6",
51
+ "@types/react": "^18.2.38",
52
+ "@types/react-dom": "^18.2.17",
53
+ "@types/react-native": "^0.72.7",
54
+ "@types/three": "^0.158.3",
55
+ "@types/uuid": "^9.0.7",
56
56
  "jsdom": "^22.1.0",
57
- "type-fest": "^4.6.0"
57
+ "type-fest": "^4.8.2"
58
58
  }
59
59
  }
@@ -1,7 +1,10 @@
1
1
  import { ReactNode } from "react";
2
+ import { ViewProps } from "react-native";
2
3
  type Props = {
3
- trigger: ReactNode;
4
4
  children: ReactNode;
5
+ trigger: ReactNode;
6
+ style?: ViewProps["style"];
7
+ contentContainerStyle?: ViewProps["style"];
5
8
  };
6
- export declare const Accordion: ({ trigger, children }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Accordion: ({ children, trigger, style, contentContainerStyle }: Props) => import("react/jsx-runtime").JSX.Element;
7
10
  export {};
@@ -38,8 +38,8 @@ const styles = StyleSheet.create({
38
38
  paddingHorizontal: spacings[20],
39
39
  },
40
40
  });
41
- export const Accordion = ({ trigger, children }) => {
41
+ export const Accordion = ({ children, trigger, style, contentContainerStyle }) => {
42
42
  const id = useId();
43
43
  const [isOpen, { toggle }] = useDisclosure(false);
44
- return (_jsxs(View, { children: [_jsxs(Pressable, { "aria-expanded": isOpen, "aria-controls": id, style: styles.trigger, onPress: toggle, children: [_jsx(Icon, { name: "chevron-right-filled", size: 12, color: colors.gray[500], style: [styles.arrow, isOpen && styles.arrowOpen] }), _jsx(Space, { width: 20 }), typeof trigger === "string" ? (_jsx(LakeText, { variant: "smallMedium", color: colors.gray[900], children: trigger })) : (trigger)] }), _jsx(View, { "aria-labelledby": id, "aria-hidden": !isOpen, role: "region", style: [styles.contentContainer, isOpen && styles.contentContainerDisplayed], children: _jsx(View, { style: styles.contentInner, children: _jsx(View, { style: styles.content, children: children }) }) })] }));
44
+ return (_jsxs(View, { children: [_jsxs(Pressable, { "aria-controls": id, "aria-expanded": isOpen, onPress: toggle, style: [styles.trigger, style], children: [_jsx(Icon, { name: "chevron-right-filled", size: 12, color: colors.gray[500], style: [styles.arrow, isOpen && styles.arrowOpen] }), _jsx(Space, { width: 20 }), typeof trigger === "string" ? (_jsx(LakeText, { variant: "smallMedium", color: colors.gray[900], children: trigger })) : (trigger)] }), _jsx(View, { "aria-labelledby": id, "aria-hidden": !isOpen, role: "region", style: [styles.contentContainer, isOpen && styles.contentContainerDisplayed], children: _jsx(View, { style: styles.contentInner, children: _jsx(View, { style: [styles.content, contentContainerStyle], children: children }) }) })] }));
45
45
  };
@@ -9,7 +9,7 @@ const styles = StyleSheet.create({
9
9
  color: colors.red[100],
10
10
  lineHeight: typography.lineHeights.input,
11
11
  minHeight: 32,
12
- paddingHorizontal: 3,
12
+ paddingHorizontal: 3, // borderRadius / 2
13
13
  paddingVertical: 4,
14
14
  },
15
15
  });
package/src/utils/svg.js CHANGED
@@ -69,9 +69,9 @@ const getMatrixColor = (color) => {
69
69
  const alpha = 1;
70
70
  // prettier-ignore
71
71
  const matrix = [
72
- red, red, red, red, red,
73
- green, green, green, green, green,
74
- blue, blue, blue, blue, blue,
72
+ red, red, red, red, red, // R
73
+ green, green, green, green, green, // G
74
+ blue, blue, blue, blue, blue, // B
75
75
  0, 0, 0, alpha, 0, // A
76
76
  ];
77
77
  return matrix.join(" ");