@korsolutions/ui 0.0.56 → 0.0.58

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.
Files changed (31) hide show
  1. package/dist/module/components/index.js +1 -0
  2. package/dist/module/components/index.js.map +1 -1
  3. package/dist/module/components/touchable/index.js +4 -0
  4. package/dist/module/components/touchable/index.js.map +1 -0
  5. package/dist/module/components/touchable/touchable.js +46 -0
  6. package/dist/module/components/touchable/touchable.js.map +1 -0
  7. package/dist/module/components/touchable/types.js +4 -0
  8. package/dist/module/components/touchable/types.js.map +1 -0
  9. package/dist/module/components/touchable/variants/default.js +24 -0
  10. package/dist/module/components/touchable/variants/default.js.map +1 -0
  11. package/dist/module/components/touchable/variants/index.js +7 -0
  12. package/dist/module/components/touchable/variants/index.js.map +1 -0
  13. package/dist/typescript/src/components/index.d.ts +1 -0
  14. package/dist/typescript/src/components/index.d.ts.map +1 -1
  15. package/dist/typescript/src/components/touchable/index.d.ts +2 -0
  16. package/dist/typescript/src/components/touchable/index.d.ts.map +1 -0
  17. package/dist/typescript/src/components/touchable/touchable.d.ts +12 -0
  18. package/dist/typescript/src/components/touchable/touchable.d.ts.map +1 -0
  19. package/dist/typescript/src/components/touchable/types.d.ts +4 -0
  20. package/dist/typescript/src/components/touchable/types.d.ts.map +1 -0
  21. package/dist/typescript/src/components/touchable/variants/default.d.ts +3 -0
  22. package/dist/typescript/src/components/touchable/variants/default.d.ts.map +1 -0
  23. package/dist/typescript/src/components/touchable/variants/index.d.ts +4 -0
  24. package/dist/typescript/src/components/touchable/variants/index.d.ts.map +1 -0
  25. package/package.json +6 -2
  26. package/src/components/index.ts +1 -0
  27. package/src/components/touchable/index.ts +1 -0
  28. package/src/components/touchable/touchable.tsx +65 -0
  29. package/src/components/touchable/types.ts +5 -0
  30. package/src/components/touchable/variants/default.tsx +21 -0
  31. package/src/components/touchable/variants/index.ts +5 -0
@@ -24,5 +24,6 @@ export * from "./select/index.js";
24
24
  export * from "./tabs/index.js";
25
25
  export * from "./textarea/index.js";
26
26
  export * from "./toast/index.js";
27
+ export * from "./touchable/index.js";
27
28
  export * from "./typography/index.js";
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,mBAAU;AACxB,cAAc,kBAAS;AACvB,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,kBAAS;AACvB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,wBAAe;AAC7B,cAAc,oBAAW;AACzB,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,uBAAc;AAC5B,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,kBAAS;AACvB,cAAc,uBAAc","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,mBAAU;AACxB,cAAc,kBAAS;AACvB,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,kBAAS;AACvB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,wBAAe;AAC7B,cAAc,oBAAW;AACzB,cAAc,mBAAU;AACxB,cAAc,qBAAY;AAC1B,cAAc,uBAAc;AAC5B,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,kBAAS;AACvB,cAAc,sBAAa;AAC3B,cAAc,uBAAc","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Touchable } from "./touchable.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Touchable"],"sourceRoot":"../../../../src","sources":["components/touchable/index.ts"],"mappings":";;AAAA,SAASA,SAAS,QAA6B,gBAAa","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from "react";
4
+ import { Pressable } from "react-native";
5
+ import { PressableVariants } from "./variants/index.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const calculateState = (props, isPressed, isHovered) => {
8
+ if (props.isDisabled) return "disabled";
9
+ if (isPressed) return "pressed";
10
+ if (isHovered) return "hovered";
11
+ return "default";
12
+ };
13
+ export function Touchable(props) {
14
+ const {
15
+ variant = "default",
16
+ isDisabled,
17
+ style,
18
+ children,
19
+ ...rest
20
+ } = props;
21
+ const variantStyles = PressableVariants[variant]();
22
+ const [isHovered, setIsHovered] = useState(false);
23
+ const handlePress = event => {
24
+ if (isDisabled) return;
25
+ rest.onPress?.(event);
26
+ };
27
+ return /*#__PURE__*/_jsx(Pressable, {
28
+ ...rest,
29
+ onPress: handlePress,
30
+ onHoverIn: e => {
31
+ setIsHovered(true);
32
+ rest.onHoverIn?.(e);
33
+ },
34
+ onHoverOut: e => {
35
+ setIsHovered(false);
36
+ rest.onHoverOut?.(e);
37
+ },
38
+ disabled: isDisabled,
39
+ style: styleState => {
40
+ const currentState = calculateState(props, styleState.pressed, isHovered);
41
+ return [variantStyles?.default, variantStyles?.[currentState], typeof style === "function" ? style(styleState) : style];
42
+ },
43
+ children: children
44
+ });
45
+ }
46
+ //# sourceMappingURL=touchable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Pressable","PressableVariants","jsx","_jsx","calculateState","props","isPressed","isHovered","isDisabled","Touchable","variant","style","children","rest","variantStyles","setIsHovered","handlePress","event","onPress","onHoverIn","e","onHoverOut","disabled","styleState","currentState","pressed","default"],"sourceRoot":"../../../../src","sources":["components/touchable/touchable.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,QAA6B,cAAc;AAE7D,SAASC,iBAAiB,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU/C,MAAMC,cAAc,GAAGA,CACrBC,KAAqB,EACrBC,SAAkB,EAClBC,SAAkB,KACC;EACnB,IAAIF,KAAK,CAACG,UAAU,EAAE,OAAO,UAAU;EACvC,IAAIF,SAAS,EAAE,OAAO,SAAS;EAC/B,IAAIC,SAAS,EAAE,OAAO,SAAS;EAC/B,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASE,SAASA,CAACJ,KAAqB,EAAE;EAC/C,MAAM;IAAEK,OAAO,GAAG,SAAS;IAAEF,UAAU;IAAEG,KAAK;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGR,KAAK;EAC3E,MAAMS,aAAa,GAAGb,iBAAiB,CAACS,OAAO,CAAC,CAAC,CAAC;EAClD,MAAM,CAACH,SAAS,EAAEQ,YAAY,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMiB,WAAsC,GAAIC,KAAK,IAAK;IACxD,IAAIT,UAAU,EAAE;IAChBK,IAAI,CAACK,OAAO,GAAGD,KAAK,CAAC;EACvB,CAAC;EAED,oBACEd,IAAA,CAACH,SAAS;IAAA,GACJa,IAAI;IACRK,OAAO,EAAEF,WAAY;IACrBG,SAAS,EAAGC,CAAC,IAAK;MAChBL,YAAY,CAAC,IAAI,CAAC;MAClBF,IAAI,CAACM,SAAS,GAAGC,CAAC,CAAC;IACrB,CAAE;IACFC,UAAU,EAAGD,CAAC,IAAK;MACjBL,YAAY,CAAC,KAAK,CAAC;MACnBF,IAAI,CAACQ,UAAU,GAAGD,CAAC,CAAC;IACtB,CAAE;IACFE,QAAQ,EAAEd,UAAW;IACrBG,KAAK,EAAGY,UAAU,IAAK;MACrB,MAAMC,YAAY,GAAGpB,cAAc,CACjCC,KAAK,EACLkB,UAAU,CAACE,OAAO,EAClBlB,SACF,CAAC;MAED,OAAO,CACLO,aAAa,EAAEY,OAAO,EACtBZ,aAAa,GAAGU,YAAY,CAAC,EAC7B,OAAOb,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACY,UAAU,CAAC,GAAGZ,KAAK,CACxD;IACH,CAAE;IAAAC,QAAA,EAEDA;EAAQ,CACA,CAAC;AAEhB","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/touchable/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ export const usePressableVariantDefault = () => {
4
+ return {
5
+ default: {
6
+ cursor: "pointer",
7
+ pointerEvents: "box-only"
8
+ },
9
+ pressed: {
10
+ opacity: 0.8,
11
+ transform: [{
12
+ scale: 0.98
13
+ }]
14
+ },
15
+ hovered: {
16
+ opacity: 0.9
17
+ },
18
+ disabled: {
19
+ cursor: "not-allowed",
20
+ pointerEvents: "none"
21
+ }
22
+ };
23
+ };
24
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["usePressableVariantDefault","default","cursor","pointerEvents","pressed","opacity","transform","scale","hovered","disabled"],"sourceRoot":"../../../../../src","sources":["components/touchable/variants/default.tsx"],"mappings":";;AAEA,OAAO,MAAMA,0BAA0B,GAAGA,CAAA,KAAuB;EAC/D,OAAO;IACLC,OAAO,EAAE;MACPC,MAAM,EAAE,SAAS;MACjBC,aAAa,EAAE;IACjB,CAAC;IACDC,OAAO,EAAE;MACPC,OAAO,EAAE,GAAG;MACZC,SAAS,EAAE,CAAC;QAAEC,KAAK,EAAE;MAAK,CAAC;IAC7B,CAAC;IACDC,OAAO,EAAE;MACPH,OAAO,EAAE;IACX,CAAC;IACDI,QAAQ,EAAE;MACRP,MAAM,EAAE,aAAoB;MAC5BC,aAAa,EAAE;IACjB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ import { usePressableVariantDefault } from "./default.js";
4
+ export const PressableVariants = {
5
+ default: usePressableVariantDefault
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["usePressableVariantDefault","PressableVariants","default"],"sourceRoot":"../../../../../src","sources":["components/touchable/variants/index.ts"],"mappings":";;AAAA,SAASA,0BAA0B,QAAQ,cAAW;AAEtD,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,OAAO,EAAEF;AACX,CAAC","ignoreList":[]}
@@ -22,5 +22,6 @@ export * from "./select";
22
22
  export * from "./tabs";
23
23
  export * from "./textarea";
24
24
  export * from "./toast";
25
+ export * from "./touchable";
25
26
  export * from "./typography";
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Touchable, type TouchableProps } from "./touchable";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/touchable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { type PressableProps } from "react-native";
3
+ import { PressableVariants } from "./variants";
4
+ type ExtendablePressableProps = Omit<PressableProps, "disabled">;
5
+ export interface TouchableProps extends ExtendablePressableProps {
6
+ variant?: keyof typeof PressableVariants;
7
+ children?: React.ReactNode;
8
+ isDisabled?: boolean;
9
+ }
10
+ export declare function Touchable(props: TouchableProps): React.JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=touchable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touchable.d.ts","sourceRoot":"","sources":["../../../../../src/components/touchable/touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,KAAK,wBAAwB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAEjE,MAAM,WAAW,cAAe,SAAQ,wBAAwB;IAC9D,OAAO,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAaD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAwC9C"}
@@ -0,0 +1,4 @@
1
+ import type { ViewStyle } from "react-native";
2
+ export type PressableState = "default" | "pressed" | "hovered" | "disabled";
3
+ export type PressableStyles = Partial<Record<PressableState, ViewStyle>>;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/touchable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PressableStyles } from "../types";
2
+ export declare const usePressableVariantDefault: () => PressableStyles;
3
+ //# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/touchable/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,0BAA0B,QAAO,eAkB7C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const PressableVariants: {
2
+ default: () => import("../types").PressableStyles;
3
+ };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/touchable/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;CAE7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korsolutions/ui",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,12 +29,16 @@
29
29
  "@types/react": "^19.2.3",
30
30
  "@types/react-dom": "^19.2.3",
31
31
  "react-native-builder-bob": "^0.40.17",
32
+ "react-native-reanimated": "catalog:",
33
+ "react-native-worklets": "catalog:",
32
34
  "typescript": "^5.9.3"
33
35
  },
34
36
  "peerDependencies": {
35
37
  "react": "*",
36
38
  "react-dom": "*",
37
39
  "react-native": "*",
38
- "react-native-web": "*"
40
+ "react-native-reanimated": "*",
41
+ "react-native-web": "*",
42
+ "react-native-worklets": "*"
39
43
  }
40
44
  }
@@ -22,4 +22,5 @@ export * from "./select";
22
22
  export * from "./tabs";
23
23
  export * from "./textarea";
24
24
  export * from "./toast";
25
+ export * from "./touchable";
25
26
  export * from "./typography";
@@ -0,0 +1 @@
1
+ export { Touchable, type TouchableProps } from "./touchable";
@@ -0,0 +1,65 @@
1
+ import React, { useState } from "react";
2
+ import { Pressable, type PressableProps } from "react-native";
3
+ import type { PressableState } from "./types";
4
+ import { PressableVariants } from "./variants";
5
+
6
+ type ExtendablePressableProps = Omit<PressableProps, "disabled">;
7
+
8
+ export interface TouchableProps extends ExtendablePressableProps {
9
+ variant?: keyof typeof PressableVariants;
10
+ children?: React.ReactNode;
11
+ isDisabled?: boolean;
12
+ }
13
+
14
+ const calculateState = (
15
+ props: TouchableProps,
16
+ isPressed: boolean,
17
+ isHovered: boolean,
18
+ ): PressableState => {
19
+ if (props.isDisabled) return "disabled";
20
+ if (isPressed) return "pressed";
21
+ if (isHovered) return "hovered";
22
+ return "default";
23
+ };
24
+
25
+ export function Touchable(props: TouchableProps) {
26
+ const { variant = "default", isDisabled, style, children, ...rest } = props;
27
+ const variantStyles = PressableVariants[variant]();
28
+ const [isHovered, setIsHovered] = useState(false);
29
+
30
+ const handlePress: PressableProps["onPress"] = (event) => {
31
+ if (isDisabled) return;
32
+ rest.onPress?.(event);
33
+ };
34
+
35
+ return (
36
+ <Pressable
37
+ {...rest}
38
+ onPress={handlePress}
39
+ onHoverIn={(e) => {
40
+ setIsHovered(true);
41
+ rest.onHoverIn?.(e);
42
+ }}
43
+ onHoverOut={(e) => {
44
+ setIsHovered(false);
45
+ rest.onHoverOut?.(e);
46
+ }}
47
+ disabled={isDisabled}
48
+ style={(styleState) => {
49
+ const currentState = calculateState(
50
+ props,
51
+ styleState.pressed,
52
+ isHovered,
53
+ );
54
+
55
+ return [
56
+ variantStyles?.default,
57
+ variantStyles?.[currentState],
58
+ typeof style === "function" ? style(styleState) : style,
59
+ ];
60
+ }}
61
+ >
62
+ {children}
63
+ </Pressable>
64
+ );
65
+ }
@@ -0,0 +1,5 @@
1
+ import type { ViewStyle } from "react-native";
2
+
3
+ export type PressableState = "default" | "pressed" | "hovered" | "disabled";
4
+
5
+ export type PressableStyles = Partial<Record<PressableState, ViewStyle>>;
@@ -0,0 +1,21 @@
1
+ import type { PressableStyles } from "../types";
2
+
3
+ export const usePressableVariantDefault = (): PressableStyles => {
4
+ return {
5
+ default: {
6
+ cursor: "pointer",
7
+ pointerEvents: "box-only",
8
+ },
9
+ pressed: {
10
+ opacity: 0.8,
11
+ transform: [{ scale: 0.98 }],
12
+ },
13
+ hovered: {
14
+ opacity: 0.9,
15
+ },
16
+ disabled: {
17
+ cursor: "not-allowed" as any,
18
+ pointerEvents: "none",
19
+ },
20
+ };
21
+ };
@@ -0,0 +1,5 @@
1
+ import { usePressableVariantDefault } from "./default";
2
+
3
+ export const PressableVariants = {
4
+ default: usePressableVariantDefault,
5
+ };