@react-xp/aeiou 0.1.0-beta.12 → 0.1.0-beta.14
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/dist/cjs/components/a/a.native.js +7 -7
- package/dist/cjs/components/a/a.web.js +7 -7
- package/dist/cjs/components/d/d.native.js +7 -7
- package/dist/cjs/components/d/d.web.js +8 -8
- package/dist/cjs/components/e/e.native.js +7 -14
- package/dist/cjs/components/e/e.web.js +7 -9
- package/dist/cjs/components/i/i.native.js +9 -5
- package/dist/cjs/components/i/i.web.js +9 -5
- package/dist/cjs/components/l/l.web.js +7 -9
- package/dist/cjs/components/o/o.native.js +4 -4
- package/dist/cjs/components/o/o.web.js +7 -4
- package/dist/cjs/components/p/p.native.js +4 -4
- package/dist/cjs/components/p/p.web.js +7 -4
- package/dist/cjs/components/s/s.native.js +4 -4
- package/dist/cjs/components/t/t.native.js +7 -8
- package/dist/cjs/components/t/t.web.js +7 -8
- package/dist/cjs/hooks/index.js +0 -3
- package/dist/cjs/hooks/index.native.js +2 -2
- package/dist/cjs/hooks/index.web.js +2 -2
- package/dist/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +43 -0
- package/dist/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +45 -0
- package/dist/cjs/hooks/useInteractiveState/useInteractiveState.native.js +53 -15
- package/dist/cjs/hooks/useInteractiveState/useInteractiveState.web.js +51 -39
- package/dist/cjs/hooks/useStyles/useStyles.helpers.js +35 -0
- package/dist/cjs/hooks/useStyles/useStyles.native.js +42 -0
- package/dist/cjs/hooks/useStyles/useStyles.web.js +71 -0
- package/dist/esm/components/a/a.native.js +7 -7
- package/dist/esm/components/a/a.web.js +7 -7
- package/dist/esm/components/d/d.native.js +5 -5
- package/dist/esm/components/d/d.web.js +5 -5
- package/dist/esm/components/e/e.native.js +6 -13
- package/dist/esm/components/e/e.web.js +6 -8
- package/dist/esm/components/i/i.native.js +7 -3
- package/dist/esm/components/i/i.web.js +7 -3
- package/dist/esm/components/l/l.web.js +6 -8
- package/dist/esm/components/o/o.native.js +3 -3
- package/dist/esm/components/o/o.web.js +6 -3
- package/dist/esm/components/p/p.native.js +3 -3
- package/dist/esm/components/p/p.web.js +6 -3
- package/dist/esm/components/s/s.native.js +3 -3
- package/dist/esm/components/t/t.native.js +6 -7
- package/dist/esm/components/t/t.web.js +6 -7
- package/dist/esm/hooks/index.js +0 -3
- package/dist/esm/hooks/index.native.js +2 -2
- package/dist/esm/hooks/index.web.js +2 -2
- package/dist/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +40 -0
- package/dist/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +42 -0
- package/dist/esm/hooks/useInteractiveState/useInteractiveState.native.js +54 -16
- package/dist/esm/hooks/useInteractiveState/useInteractiveState.web.js +51 -39
- package/dist/esm/hooks/useStyles/useStyles.helpers.js +29 -0
- package/dist/esm/hooks/useStyles/useStyles.native.js +38 -0
- package/dist/esm/hooks/useStyles/useStyles.web.js +66 -0
- package/dist/native/cjs/components/a/a.native.js +7 -7
- package/dist/native/cjs/components/a/a.web.js +7 -7
- package/dist/native/cjs/components/d/d.native.js +7 -7
- package/dist/native/cjs/components/d/d.web.js +8 -8
- package/dist/native/cjs/components/e/e.native.js +7 -14
- package/dist/native/cjs/components/e/e.web.js +7 -9
- package/dist/native/cjs/components/i/i.native.js +9 -5
- package/dist/native/cjs/components/i/i.web.js +9 -5
- package/dist/native/cjs/components/l/l.web.js +7 -9
- package/dist/native/cjs/components/o/o.native.js +4 -4
- package/dist/native/cjs/components/o/o.web.js +7 -4
- package/dist/native/cjs/components/p/p.native.js +4 -4
- package/dist/native/cjs/components/p/p.web.js +7 -4
- package/dist/native/cjs/components/s/s.native.js +4 -4
- package/dist/native/cjs/components/t/t.native.js +7 -8
- package/dist/native/cjs/components/t/t.web.js +7 -8
- package/dist/native/cjs/hooks/index.js +0 -3
- package/dist/native/cjs/hooks/index.native.js +2 -2
- package/dist/native/cjs/hooks/index.web.js +2 -2
- package/dist/native/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +43 -0
- package/dist/native/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +45 -0
- package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.native.js +53 -15
- package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.web.js +51 -39
- package/dist/native/cjs/hooks/useStyles/useStyles.helpers.js +35 -0
- package/dist/native/cjs/hooks/useStyles/useStyles.native.js +42 -0
- package/dist/native/cjs/hooks/useStyles/useStyles.web.js +71 -0
- package/dist/native/esm/components/a/a.native.js +7 -7
- package/dist/native/esm/components/a/a.web.js +7 -7
- package/dist/native/esm/components/d/d.native.js +5 -5
- package/dist/native/esm/components/d/d.web.js +5 -5
- package/dist/native/esm/components/e/e.native.js +6 -13
- package/dist/native/esm/components/e/e.web.js +6 -8
- package/dist/native/esm/components/i/i.native.js +7 -3
- package/dist/native/esm/components/i/i.web.js +7 -3
- package/dist/native/esm/components/l/l.web.js +6 -8
- package/dist/native/esm/components/o/o.native.js +3 -3
- package/dist/native/esm/components/o/o.web.js +6 -3
- package/dist/native/esm/components/p/p.native.js +3 -3
- package/dist/native/esm/components/p/p.web.js +6 -3
- package/dist/native/esm/components/s/s.native.js +3 -3
- package/dist/native/esm/components/t/t.native.js +6 -7
- package/dist/native/esm/components/t/t.web.js +6 -7
- package/dist/native/esm/hooks/index.js +0 -3
- package/dist/native/esm/hooks/index.native.js +2 -2
- package/dist/native/esm/hooks/index.web.js +2 -2
- package/dist/native/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +40 -0
- package/dist/native/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +42 -0
- package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.native.js +54 -16
- package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.web.js +51 -39
- package/dist/native/esm/hooks/useStyles/useStyles.helpers.js +29 -0
- package/dist/native/esm/hooks/useStyles/useStyles.native.js +38 -0
- package/dist/native/esm/hooks/useStyles/useStyles.web.js +66 -0
- package/dist/native/tsconfig.native.cjs.tsbuildinfo +1 -1
- package/dist/native/tsconfig.native.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/components/a/a.native.d.ts +1 -1
- package/dist/types/components/a/a.native.d.ts.map +1 -1
- package/dist/types/components/a/a.web.d.ts +1 -1
- package/dist/types/components/a/a.web.d.ts.map +1 -1
- package/dist/types/components/d/d.native.d.ts +1 -1
- package/dist/types/components/d/d.native.d.ts.map +1 -1
- package/dist/types/components/d/d.web.d.ts +1 -1
- package/dist/types/components/d/d.web.d.ts.map +1 -1
- package/dist/types/components/e/e.native.d.ts +1 -1
- package/dist/types/components/e/e.native.d.ts.map +1 -1
- package/dist/types/components/e/e.web.d.ts +1 -1
- package/dist/types/components/e/e.web.d.ts.map +1 -1
- package/dist/types/components/i/i.native.d.ts +1 -1
- package/dist/types/components/i/i.native.d.ts.map +1 -1
- package/dist/types/components/i/i.web.d.ts +1 -1
- package/dist/types/components/i/i.web.d.ts.map +1 -1
- package/dist/types/components/i/useIUtils.d.ts +2 -2
- package/dist/types/components/l/l.web.d.ts +1 -1
- package/dist/types/components/l/l.web.d.ts.map +1 -1
- package/dist/types/components/o/o.native.d.ts +1 -1
- package/dist/types/components/o/o.native.d.ts.map +1 -1
- package/dist/types/components/o/o.web.d.ts +1 -1
- package/dist/types/components/o/o.web.d.ts.map +1 -1
- package/dist/types/components/p/p.native.d.ts +1 -1
- package/dist/types/components/p/p.native.d.ts.map +1 -1
- package/dist/types/components/p/p.web.d.ts +1 -1
- package/dist/types/components/p/p.web.d.ts.map +1 -1
- package/dist/types/components/s/s.native.d.ts +1 -1
- package/dist/types/components/s/s.native.d.ts.map +1 -1
- package/dist/types/components/t/t.native.d.ts +1 -1
- package/dist/types/components/t/t.native.d.ts.map +1 -1
- package/dist/types/components/t/t.web.d.ts +1 -1
- package/dist/types/components/t/t.web.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +0 -3
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/index.native.d.ts +2 -2
- package/dist/types/hooks/index.native.d.ts.map +1 -1
- package/dist/types/hooks/index.web.d.ts +2 -2
- package/dist/types/hooks/index.web.d.ts.map +1 -1
- package/dist/types/hooks/useInteractiveHandlers/useInteractiveHandlers.native.d.ts +11 -0
- package/dist/types/hooks/useInteractiveHandlers/useInteractiveHandlers.native.d.ts.map +1 -0
- package/dist/types/hooks/useInteractiveHandlers/useInteractiveHandlers.web.d.ts +12 -0
- package/dist/types/hooks/useInteractiveHandlers/useInteractiveHandlers.web.d.ts.map +1 -0
- package/dist/types/hooks/useInteractiveState/useInteractiveState.native.d.ts +12 -6
- package/dist/types/hooks/useInteractiveState/useInteractiveState.native.d.ts.map +1 -1
- package/dist/types/hooks/useInteractiveState/useInteractiveState.web.d.ts +13 -12
- package/dist/types/hooks/useInteractiveState/useInteractiveState.web.d.ts.map +1 -1
- package/dist/types/hooks/useStyles/useStyles.helpers.d.ts +171 -0
- package/dist/types/hooks/useStyles/useStyles.helpers.d.ts.map +1 -0
- package/dist/types/hooks/useStyles/useStyles.native.d.ts +15 -0
- package/dist/types/hooks/useStyles/useStyles.native.d.ts.map +1 -0
- package/dist/types/hooks/useStyles/useStyles.types.d.ts +6 -0
- package/dist/types/hooks/useStyles/useStyles.types.d.ts.map +1 -0
- package/dist/types/hooks/useStyles/useStyles.web.d.ts +11 -0
- package/dist/types/hooks/useStyles/useStyles.web.d.ts.map +1 -0
- package/dist/types/types/base.d.ts +38 -6
- package/dist/types/types/base.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/hooks/useAction/useAction.native.js +0 -18
- package/dist/cjs/hooks/useAction/useAction.web.js +0 -21
- package/dist/cjs/hooks/useOnHoverOrPress.js +0 -21
- package/dist/esm/hooks/useAction/useAction.native.js +0 -14
- package/dist/esm/hooks/useAction/useAction.web.js +0 -17
- package/dist/esm/hooks/useOnHoverOrPress.js +0 -17
- package/dist/native/cjs/hooks/useAction/types.js +0 -2
- package/dist/native/cjs/hooks/useAction/useAction.native.js +0 -18
- package/dist/native/cjs/hooks/useAction/useAction.web.js +0 -21
- package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.types.js +0 -2
- package/dist/native/cjs/hooks/useOnHoverOrPress.js +0 -21
- package/dist/native/esm/hooks/useAction/types.js +0 -1
- package/dist/native/esm/hooks/useAction/useAction.native.js +0 -14
- package/dist/native/esm/hooks/useAction/useAction.web.js +0 -17
- package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.types.js +0 -1
- package/dist/native/esm/hooks/useOnHoverOrPress.js +0 -17
- package/dist/types/hooks/useAction/types.d.ts +0 -7
- package/dist/types/hooks/useAction/types.d.ts.map +0 -1
- package/dist/types/hooks/useAction/useAction.native.d.ts +0 -5
- package/dist/types/hooks/useAction/useAction.native.d.ts.map +0 -1
- package/dist/types/hooks/useAction/useAction.web.d.ts +0 -5
- package/dist/types/hooks/useAction/useAction.web.d.ts.map +0 -1
- package/dist/types/hooks/useInteractiveState/useInteractiveState.types.d.ts +0 -18
- package/dist/types/hooks/useInteractiveState/useInteractiveState.types.d.ts.map +0 -1
- package/dist/types/hooks/useOnHoverOrPress.d.ts +0 -12
- package/dist/types/hooks/useOnHoverOrPress.d.ts.map +0 -1
- /package/dist/cjs/hooks/{useAction/types.js → useStyles/useStyles.types.js} +0 -0
- /package/dist/esm/hooks/{useAction/types.js → useStyles/useStyles.types.js} +0 -0
- /package/dist/{cjs/hooks/useInteractiveState/useInteractiveState.types.js → native/cjs/hooks/useStyles/useStyles.types.js} +0 -0
- /package/dist/{esm/hooks/useInteractiveState/useInteractiveState.types.js → native/esm/hooks/useStyles/useStyles.types.js} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TAny, TInteractiveHandlersProps } from '../../types';
|
|
2
|
+
export declare function useInteractiveHandlers({ disabled, onBlur, onClick, onFocus, onPress, onIn, onOut, }?: TInteractiveHandlersProps): {
|
|
3
|
+
disabled: boolean | undefined;
|
|
4
|
+
eventHandlers: {
|
|
5
|
+
onBlur: (e: React.FocusEvent<TAny>) => void;
|
|
6
|
+
onClick: (e: React.MouseEvent<TAny>) => void;
|
|
7
|
+
onFocus: (e: React.FocusEvent<TAny>) => void;
|
|
8
|
+
onMouseEnter: (e: React.MouseEvent<TAny>) => void;
|
|
9
|
+
onMouseLeave: (e: React.MouseEvent<TAny>) => void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useInteractiveHandlers.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInteractiveHandlers.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInteractiveHandlers/useInteractiveHandlers.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAEnE,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,GACN,GAAE,yBAA8B;;;oBAEjB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;qBAOrB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;qBAatB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;0BAOjB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;0BAOtB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;;EAa3C"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import type { GestureResponderEvent } from 'react-native';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function useInteractiveState(
|
|
4
|
-
state: "idle" | "pressed" | "disabled";
|
|
1
|
+
import type { GestureResponderEvent, NativeSyntheticEvent, TargetedEvent } from 'react-native';
|
|
2
|
+
import type { TInteractionState, TInteractiveStateProps } from '../../types';
|
|
3
|
+
export declare function useInteractiveState({ disabled, onBlur, onClick, onFocus, onPress, onIn, onOut, }?: TInteractiveStateProps): {
|
|
5
4
|
dataAttrs: {
|
|
6
|
-
readonly 'data-state':
|
|
7
|
-
readonly 'data-pressed': "true" | "false";
|
|
5
|
+
readonly 'data-state': TInteractionState;
|
|
8
6
|
readonly 'data-disabled': "true" | "false";
|
|
7
|
+
readonly 'data-focused': "true" | "false";
|
|
8
|
+
readonly 'data-hovered': "true" | "false";
|
|
9
|
+
readonly 'data-pressed': "true" | "false";
|
|
9
10
|
};
|
|
11
|
+
disabled: boolean | undefined;
|
|
10
12
|
eventHandlers: {
|
|
13
|
+
onBlur: (e: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
14
|
+
onFocus: (e: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
15
|
+
onPress: (e: GestureResponderEvent) => void;
|
|
11
16
|
onPressIn: (e: GestureResponderEvent) => void;
|
|
12
17
|
onPressOut: (e: GestureResponderEvent) => void;
|
|
13
18
|
};
|
|
19
|
+
interactiveState: TInteractionState;
|
|
14
20
|
};
|
|
15
21
|
//# sourceMappingURL=useInteractiveState.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInteractiveState.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInteractiveState/useInteractiveState.native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useInteractiveState.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInteractiveState/useInteractiveState.native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE7E,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,GACN,GAAE,sBAA2B;;;;;;;;;;oBAed,oBAAoB,CAAC,aAAa,CAAC;qBASlC,oBAAoB,CAAC,aAAa,CAAC;qBASnC,qBAAqB;uBAyBnB,qBAAqB;wBASpB,qBAAqB;;;EAiBxC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import type { TAny } from '../../types';
|
|
2
|
-
|
|
3
|
-
export declare function useInteractiveState(options?: TUseInteractiveStateOptions): {
|
|
4
|
-
state: TInteractiveState;
|
|
1
|
+
import type { TAny, TInteractionState, TInteractiveStateProps } from '../../types';
|
|
2
|
+
export declare function useInteractiveState({ disabled, onBlur, onClick, onFocus, onPress, onIn, onOut, }?: TInteractiveStateProps): {
|
|
5
3
|
dataAttrs: {
|
|
6
|
-
readonly 'data-state':
|
|
4
|
+
readonly 'data-state': TInteractionState;
|
|
5
|
+
readonly 'data-disabled': "true" | "false";
|
|
6
|
+
readonly 'data-focused': "true" | "false";
|
|
7
7
|
readonly 'data-hovered': "true" | "false";
|
|
8
8
|
readonly 'data-pressed': "true" | "false";
|
|
9
|
-
readonly 'data-focused': "true" | "false";
|
|
10
|
-
readonly 'data-disabled': "true" | "false";
|
|
11
9
|
};
|
|
10
|
+
disabled: boolean | undefined;
|
|
12
11
|
eventHandlers: {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
onBlur: (e: React.FocusEvent<TAny>) => void;
|
|
13
|
+
onClick: (e: React.MouseEvent<TAny>) => void;
|
|
14
|
+
onFocus: (e: React.FocusEvent<TAny>) => void;
|
|
15
15
|
onMouseDown: (e: React.MouseEvent<TAny>) => void;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
onMouseEnter: (e: React.MouseEvent<TAny>) => void;
|
|
17
|
+
onMouseLeave: (e: React.MouseEvent<TAny>) => void;
|
|
18
|
+
onMouseUp: (e: React.MouseEvent<TAny>) => void;
|
|
19
19
|
};
|
|
20
|
+
interactiveState: TInteractionState;
|
|
20
21
|
};
|
|
21
22
|
//# sourceMappingURL=useInteractiveState.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInteractiveState.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInteractiveState/useInteractiveState.web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useInteractiveState.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInteractiveState/useInteractiveState.web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAErB,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,GACN,GAAE,sBAA2B;;;;;;;;;;oBAad,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;qBASrB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;qBAatB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;yBASlB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;0BAOrB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;0BAStB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;uBAWzB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;;;EAiBxC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { TUniversalStyle, TUniversalStylePrimitive } from '../../types';
|
|
2
|
+
export declare const extractStyles: (style: TUniversalStyle) => {
|
|
3
|
+
styleBase: {
|
|
4
|
+
color?: import("react-native").ColorValue | undefined;
|
|
5
|
+
fontFamily?: string | undefined;
|
|
6
|
+
fontSize?: number | undefined;
|
|
7
|
+
fontStyle?: "normal" | "italic" | undefined;
|
|
8
|
+
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
|
|
9
|
+
letterSpacing?: number | undefined;
|
|
10
|
+
lineHeight?: number | undefined;
|
|
11
|
+
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
|
|
12
|
+
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
|
|
13
|
+
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | undefined;
|
|
14
|
+
textDecorationColor?: import("react-native").ColorValue | undefined;
|
|
15
|
+
textShadowColor?: import("react-native").ColorValue | undefined;
|
|
16
|
+
textShadowOffset?: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
} | undefined;
|
|
20
|
+
textShadowRadius?: number | undefined;
|
|
21
|
+
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
22
|
+
userSelect?: "auto" | "none" | "text" | "contain" | "all" | undefined;
|
|
23
|
+
fontVariant?: import("react-native").FontVariant[] | undefined;
|
|
24
|
+
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
|
|
25
|
+
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
26
|
+
backgroundColor?: import("react-native").ColorValue | undefined;
|
|
27
|
+
borderBlockColor?: import("react-native").ColorValue | undefined;
|
|
28
|
+
borderBlockEndColor?: import("react-native").ColorValue | undefined;
|
|
29
|
+
borderBlockStartColor?: import("react-native").ColorValue | undefined;
|
|
30
|
+
borderBottomColor?: import("react-native").ColorValue | undefined;
|
|
31
|
+
borderBottomEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
32
|
+
borderBottomLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
33
|
+
borderBottomRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
34
|
+
borderBottomStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
35
|
+
borderColor?: import("react-native").ColorValue | undefined;
|
|
36
|
+
borderCurve?: "circular" | "continuous" | undefined;
|
|
37
|
+
borderEndColor?: import("react-native").ColorValue | undefined;
|
|
38
|
+
borderEndEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
39
|
+
borderEndStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
40
|
+
borderLeftColor?: import("react-native").ColorValue | undefined;
|
|
41
|
+
borderRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
42
|
+
borderRightColor?: import("react-native").ColorValue | undefined;
|
|
43
|
+
borderStartColor?: import("react-native").ColorValue | undefined;
|
|
44
|
+
borderStartEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
45
|
+
borderStartStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
46
|
+
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
47
|
+
borderTopColor?: import("react-native").ColorValue | undefined;
|
|
48
|
+
borderTopEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
49
|
+
borderTopLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
50
|
+
borderTopRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
51
|
+
borderTopStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
52
|
+
outlineColor?: import("react-native").ColorValue | undefined;
|
|
53
|
+
outlineOffset?: import("react-native").AnimatableNumericValue | undefined;
|
|
54
|
+
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
55
|
+
outlineWidth?: import("react-native").AnimatableNumericValue | undefined;
|
|
56
|
+
opacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
57
|
+
elevation?: number | undefined;
|
|
58
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
59
|
+
isolation?: "auto" | "isolate" | undefined;
|
|
60
|
+
cursor?: import("react-native").CursorValue | undefined;
|
|
61
|
+
boxShadow?: ReadonlyArray<import("react-native").BoxShadowValue> | string | undefined;
|
|
62
|
+
filter?: ReadonlyArray<import("react-native").FilterFunction> | string | undefined;
|
|
63
|
+
mixBlendMode?: import("react-native").BlendMode | undefined;
|
|
64
|
+
experimental_backgroundImage?: ReadonlyArray<import("react-native").GradientValue> | string | undefined;
|
|
65
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
66
|
+
alignItems?: import("react-native").FlexAlignType | undefined;
|
|
67
|
+
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
|
|
68
|
+
aspectRatio?: number | string | undefined;
|
|
69
|
+
borderBottomWidth?: number | undefined;
|
|
70
|
+
borderEndWidth?: number | undefined;
|
|
71
|
+
borderLeftWidth?: number | undefined;
|
|
72
|
+
borderRightWidth?: number | undefined;
|
|
73
|
+
borderStartWidth?: number | undefined;
|
|
74
|
+
borderTopWidth?: number | undefined;
|
|
75
|
+
borderWidth?: number | undefined;
|
|
76
|
+
bottom?: import("react-native").DimensionValue | undefined;
|
|
77
|
+
boxSizing?: "border-box" | "content-box" | undefined;
|
|
78
|
+
display?: "none" | "flex" | "contents" | undefined;
|
|
79
|
+
end?: import("react-native").DimensionValue | undefined;
|
|
80
|
+
flex?: number | undefined;
|
|
81
|
+
flexBasis?: import("react-native").DimensionValue | undefined;
|
|
82
|
+
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
83
|
+
rowGap?: number | string | undefined;
|
|
84
|
+
gap?: number | string | undefined;
|
|
85
|
+
columnGap?: number | string | undefined;
|
|
86
|
+
flexGrow?: number | undefined;
|
|
87
|
+
flexShrink?: number | undefined;
|
|
88
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
89
|
+
height?: import("react-native").DimensionValue | undefined;
|
|
90
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
91
|
+
left?: import("react-native").DimensionValue | undefined;
|
|
92
|
+
margin?: import("react-native").DimensionValue | undefined;
|
|
93
|
+
marginBottom?: import("react-native").DimensionValue | undefined;
|
|
94
|
+
marginEnd?: import("react-native").DimensionValue | undefined;
|
|
95
|
+
marginHorizontal?: import("react-native").DimensionValue | undefined;
|
|
96
|
+
marginLeft?: import("react-native").DimensionValue | undefined;
|
|
97
|
+
marginRight?: import("react-native").DimensionValue | undefined;
|
|
98
|
+
marginStart?: import("react-native").DimensionValue | undefined;
|
|
99
|
+
marginTop?: import("react-native").DimensionValue | undefined;
|
|
100
|
+
marginVertical?: import("react-native").DimensionValue | undefined;
|
|
101
|
+
maxHeight?: import("react-native").DimensionValue | undefined;
|
|
102
|
+
maxWidth?: import("react-native").DimensionValue | undefined;
|
|
103
|
+
minHeight?: import("react-native").DimensionValue | undefined;
|
|
104
|
+
minWidth?: import("react-native").DimensionValue | undefined;
|
|
105
|
+
overflow?: "visible" | "hidden" | "scroll" | undefined;
|
|
106
|
+
padding?: import("react-native").DimensionValue | undefined;
|
|
107
|
+
paddingBottom?: import("react-native").DimensionValue | undefined;
|
|
108
|
+
paddingEnd?: import("react-native").DimensionValue | undefined;
|
|
109
|
+
paddingHorizontal?: import("react-native").DimensionValue | undefined;
|
|
110
|
+
paddingLeft?: import("react-native").DimensionValue | undefined;
|
|
111
|
+
paddingRight?: import("react-native").DimensionValue | undefined;
|
|
112
|
+
paddingStart?: import("react-native").DimensionValue | undefined;
|
|
113
|
+
paddingTop?: import("react-native").DimensionValue | undefined;
|
|
114
|
+
paddingVertical?: import("react-native").DimensionValue | undefined;
|
|
115
|
+
position?: "absolute" | "relative" | "static" | undefined;
|
|
116
|
+
right?: import("react-native").DimensionValue | undefined;
|
|
117
|
+
start?: import("react-native").DimensionValue | undefined;
|
|
118
|
+
top?: import("react-native").DimensionValue | undefined;
|
|
119
|
+
width?: import("react-native").DimensionValue | undefined;
|
|
120
|
+
zIndex?: number | undefined;
|
|
121
|
+
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
122
|
+
inset?: import("react-native").DimensionValue | undefined;
|
|
123
|
+
insetBlock?: import("react-native").DimensionValue | undefined;
|
|
124
|
+
insetBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
125
|
+
insetBlockStart?: import("react-native").DimensionValue | undefined;
|
|
126
|
+
insetInline?: import("react-native").DimensionValue | undefined;
|
|
127
|
+
insetInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
128
|
+
insetInlineStart?: import("react-native").DimensionValue | undefined;
|
|
129
|
+
marginBlock?: import("react-native").DimensionValue | undefined;
|
|
130
|
+
marginBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
131
|
+
marginBlockStart?: import("react-native").DimensionValue | undefined;
|
|
132
|
+
marginInline?: import("react-native").DimensionValue | undefined;
|
|
133
|
+
marginInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
134
|
+
marginInlineStart?: import("react-native").DimensionValue | undefined;
|
|
135
|
+
paddingBlock?: import("react-native").DimensionValue | undefined;
|
|
136
|
+
paddingBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
137
|
+
paddingBlockStart?: import("react-native").DimensionValue | undefined;
|
|
138
|
+
paddingInline?: import("react-native").DimensionValue | undefined;
|
|
139
|
+
paddingInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
140
|
+
paddingInlineStart?: import("react-native").DimensionValue | undefined;
|
|
141
|
+
shadowColor?: import("react-native").ColorValue | undefined;
|
|
142
|
+
shadowOffset?: Readonly<{
|
|
143
|
+
width: number;
|
|
144
|
+
height: number;
|
|
145
|
+
}> | undefined;
|
|
146
|
+
shadowOpacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
147
|
+
shadowRadius?: number | undefined;
|
|
148
|
+
transform?: Readonly<import("react-native").MaximumOneOf<import("react-native").PerspectiveTransform & import("react-native").RotateTransform & import("react-native").RotateXTransform & import("react-native").RotateYTransform & import("react-native").RotateZTransform & import("react-native").ScaleTransform & import("react-native").ScaleXTransform & import("react-native").ScaleYTransform & import("react-native").TranslateXTransform & import("react-native").TranslateYTransform & import("react-native").SkewXTransform & import("react-native").SkewYTransform & import("react-native").MatrixTransform>[]> | string | undefined;
|
|
149
|
+
transformOrigin?: Array<string | number> | string | undefined;
|
|
150
|
+
transformMatrix?: Array<number> | undefined;
|
|
151
|
+
rotation?: import("react-native").AnimatableNumericValue | undefined;
|
|
152
|
+
scaleX?: import("react-native").AnimatableNumericValue | undefined;
|
|
153
|
+
scaleY?: import("react-native").AnimatableNumericValue | undefined;
|
|
154
|
+
translateX?: import("react-native").AnimatableNumericValue | undefined;
|
|
155
|
+
translateY?: import("react-native").AnimatableNumericValue | undefined;
|
|
156
|
+
textAlignVertical?: "auto" | "top" | "bottom" | "center" | undefined;
|
|
157
|
+
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
|
|
158
|
+
includeFontPadding?: boolean | undefined;
|
|
159
|
+
$disabled?: TUniversalStylePrimitive;
|
|
160
|
+
$focused?: TUniversalStylePrimitive;
|
|
161
|
+
$hovered?: TUniversalStylePrimitive;
|
|
162
|
+
$pressed?: TUniversalStylePrimitive;
|
|
163
|
+
};
|
|
164
|
+
styleDisabled: import("react-native").TextStyle;
|
|
165
|
+
styleFocused: import("react-native").TextStyle;
|
|
166
|
+
styleHovered: import("react-native").TextStyle;
|
|
167
|
+
stylePressed: import("react-native").TextStyle;
|
|
168
|
+
};
|
|
169
|
+
export declare const toKebab: (s: string) => string;
|
|
170
|
+
export declare const toCssDecls: (style?: TUniversalStylePrimitive) => string;
|
|
171
|
+
//# sourceMappingURL=useStyles.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStyles.helpers.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStyles/useStyles.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE7E,eAAO,MAAM,aAAa,GAAI,OAAO,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBnD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,WACkB,CAAC;AAEpD,eAAO,MAAM,UAAU,GAAI,QAAQ,wBAAwB,WAU1D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TUniversalStyleOptions } from '../../types';
|
|
2
|
+
import type { TUseStylesMethodGetStylesProps } from './useStyles.types';
|
|
3
|
+
export declare const useStyles: () => {
|
|
4
|
+
getStyles: <TStyle>({ disabled, style, }: TUseStylesMethodGetStylesProps) => {
|
|
5
|
+
style?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
style: TStyle;
|
|
8
|
+
};
|
|
9
|
+
getStylesWithInteraction: <TStyle>({ disabled, style }: TUseStylesMethodGetStylesProps) => (options?: TUniversalStyleOptions) => {
|
|
10
|
+
style?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
style: TStyle;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useStyles.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStyles.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStyles/useStyles.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAwDxE,eAAO,MAAM,SAAS;gBAtDH,MAAM,wBAGtB,8BAA8B;;;eAaE,MAAM;;+BAItC,MAAM,uBAAwB,8BAA8B,MAC5D,UAAU,sBAAsB;;;eA8BE,MAAM;;CAQ1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStyles.types.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStyles/useStyles.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TUniversalStyle } from '../../types';
|
|
2
|
+
import type { TUseStylesMethodGetStylesProps } from './useStyles.types';
|
|
3
|
+
export declare const createInteractiveClass: ({ disabled, id, style, }: {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
id: string;
|
|
6
|
+
style: TUniversalStyle;
|
|
7
|
+
}) => string;
|
|
8
|
+
export declare const useStyles: () => {
|
|
9
|
+
getStyles: ({ disabled, style }: TUseStylesMethodGetStylesProps) => {};
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useStyles.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStyles.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStyles/useStyles.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAgBxE,eAAO,MAAM,sBAAsB,GAAI,0BAIpC;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,WAsC5D,CAAC;AAiBF,eAAO,MAAM,SAAS;qCAbE,8BAA8B;CA4BrD,CAAC"}
|
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AccessibilityRole, AccessibilityState, ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
export type TAny = any;
|
|
4
|
-
export type
|
|
4
|
+
export type TUniversalStylePrimitive = TextStyle;
|
|
5
|
+
export type TNativeStyle = ImageStyle | TextStyle | ViewStyle;
|
|
5
6
|
export type TWebStyle = CSSProperties;
|
|
6
|
-
export type TUniversalStyle =
|
|
7
|
+
export type TUniversalStyle = TUniversalStylePrimitive & {
|
|
8
|
+
$disabled?: TUniversalStylePrimitive;
|
|
9
|
+
$focused?: TUniversalStylePrimitive;
|
|
10
|
+
$hovered?: TUniversalStylePrimitive;
|
|
11
|
+
$pressed?: TUniversalStylePrimitive;
|
|
12
|
+
};
|
|
13
|
+
export type TUniversalStyleOptions = {
|
|
14
|
+
focused?: boolean;
|
|
15
|
+
hovered?: boolean;
|
|
16
|
+
pressed?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TInteractionState = 'idle' | 'hovered' | 'pressed' | 'focused';
|
|
7
19
|
export type TBasePrimitiveProps = {
|
|
8
20
|
children?: ReactNode;
|
|
9
21
|
className?: string;
|
|
10
22
|
ref?: Ref<TAny>;
|
|
11
23
|
style?: TUniversalStyle;
|
|
12
24
|
};
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
export type TInteractiveHandlersProps = {
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
onBlur?: (e?: TAny) => void;
|
|
28
|
+
onClick?: (e?: TAny) => void;
|
|
29
|
+
onFocus?: (e?: TAny) => void;
|
|
30
|
+
onIn?: (e?: TAny) => void;
|
|
31
|
+
onOut?: (e?: TAny) => void;
|
|
32
|
+
onPress?: (e?: TAny) => void;
|
|
33
|
+
};
|
|
34
|
+
export type TInteractiveStateProps = {
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
onBlur?: (e?: TAny) => void;
|
|
37
|
+
onClick?: (e?: TAny) => void;
|
|
38
|
+
onFocus?: (e?: TAny) => void;
|
|
39
|
+
onIn?: (e?: TAny) => void;
|
|
40
|
+
onOut?: (e?: TAny) => void;
|
|
41
|
+
onPress?: (e?: TAny) => void;
|
|
16
42
|
};
|
|
43
|
+
export type TBasePrimitiveWithActionProps = TBasePrimitiveProps & TInteractiveHandlersProps;
|
|
17
44
|
export type TActionProps = TBasePrimitiveWithActionProps & {
|
|
45
|
+
accessibilityLabel?: string;
|
|
46
|
+
accessibilityRole?: AccessibilityRole;
|
|
47
|
+
accessibilityState?: AccessibilityState;
|
|
18
48
|
disabled?: boolean;
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
testId?: string;
|
|
19
51
|
};
|
|
20
52
|
export type TElementProps = TBasePrimitiveWithActionProps & {
|
|
21
53
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC;AAEvB,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC;AACtC,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG;IACvD,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,QAAQ,CAAC,EAAE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E,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAction = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useAction = ({ onClick, onPress, }) => {
|
|
6
|
-
return (0, react_1.useMemo)(() => ({
|
|
7
|
-
onAction: (event) => {
|
|
8
|
-
if (onPress) {
|
|
9
|
-
onPress(event);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (onClick) {
|
|
13
|
-
onClick(event);
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
}), [onClick, onPress]);
|
|
17
|
-
};
|
|
18
|
-
exports.useAction = useAction;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAction = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useAction = ({ onClick, onPress, preventDefault, }) => {
|
|
6
|
-
return (0, react_1.useMemo)(() => ({
|
|
7
|
-
onAction: (event) => {
|
|
8
|
-
if (preventDefault && event && 'preventDefault' in event) {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
}
|
|
11
|
-
if (onClick) {
|
|
12
|
-
onClick(event);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (onPress) {
|
|
16
|
-
onPress(event);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
}), [onClick, onPress, preventDefault]);
|
|
20
|
-
};
|
|
21
|
-
exports.useAction = useAction;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useOnHoverOrPress = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useOnHoverOrPress = ({ onIn, onOut }) => {
|
|
6
|
-
const value = (0, react_1.useRef)('on');
|
|
7
|
-
return (0, react_1.useMemo)(() => ({
|
|
8
|
-
onMouseEnter: onIn,
|
|
9
|
-
onMouseLeave: onOut,
|
|
10
|
-
onPress: (event) => {
|
|
11
|
-
if (value.current === 'on') {
|
|
12
|
-
value.current = 'off';
|
|
13
|
-
onOut?.(event);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
value.current = 'on';
|
|
17
|
-
onIn?.(event);
|
|
18
|
-
},
|
|
19
|
-
}), [onIn, onOut]);
|
|
20
|
-
};
|
|
21
|
-
exports.useOnHoverOrPress = useOnHoverOrPress;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export const useAction = ({ onClick, onPress, }) => {
|
|
3
|
-
return useMemo(() => ({
|
|
4
|
-
onAction: (event) => {
|
|
5
|
-
if (onPress) {
|
|
6
|
-
onPress(event);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (onClick) {
|
|
10
|
-
onClick(event);
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
}), [onClick, onPress]);
|
|
14
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export const useAction = ({ onClick, onPress, preventDefault, }) => {
|
|
3
|
-
return useMemo(() => ({
|
|
4
|
-
onAction: (event) => {
|
|
5
|
-
if (preventDefault && event && 'preventDefault' in event) {
|
|
6
|
-
event.preventDefault();
|
|
7
|
-
}
|
|
8
|
-
if (onClick) {
|
|
9
|
-
onClick(event);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (onPress) {
|
|
13
|
-
onPress(event);
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
}), [onClick, onPress, preventDefault]);
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useMemo, useRef } from 'react';
|
|
2
|
-
export const useOnHoverOrPress = ({ onIn, onOut }) => {
|
|
3
|
-
const value = useRef('on');
|
|
4
|
-
return useMemo(() => ({
|
|
5
|
-
onMouseEnter: onIn,
|
|
6
|
-
onMouseLeave: onOut,
|
|
7
|
-
onPress: (event) => {
|
|
8
|
-
if (value.current === 'on') {
|
|
9
|
-
value.current = 'off';
|
|
10
|
-
onOut?.(event);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
value.current = 'on';
|
|
14
|
-
onIn?.(event);
|
|
15
|
-
},
|
|
16
|
-
}), [onIn, onOut]);
|
|
17
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAction = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useAction = ({ onClick, onPress, }) => {
|
|
6
|
-
return (0, react_1.useMemo)(() => ({
|
|
7
|
-
onAction: (event) => {
|
|
8
|
-
if (onPress) {
|
|
9
|
-
onPress(event);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (onClick) {
|
|
13
|
-
onClick(event);
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
}), [onClick, onPress]);
|
|
17
|
-
};
|
|
18
|
-
exports.useAction = useAction;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAction = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useAction = ({ onClick, onPress, preventDefault, }) => {
|
|
6
|
-
return (0, react_1.useMemo)(() => ({
|
|
7
|
-
onAction: (event) => {
|
|
8
|
-
if (preventDefault && event && 'preventDefault' in event) {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
}
|
|
11
|
-
if (onClick) {
|
|
12
|
-
onClick(event);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (onPress) {
|
|
16
|
-
onPress(event);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
}), [onClick, onPress, preventDefault]);
|
|
20
|
-
};
|
|
21
|
-
exports.useAction = useAction;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useOnHoverOrPress = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useOnHoverOrPress = ({ onIn, onOut }) => {
|
|
6
|
-
const value = (0, react_1.useRef)('on');
|
|
7
|
-
return (0, react_1.useMemo)(() => ({
|
|
8
|
-
onMouseEnter: onIn,
|
|
9
|
-
onMouseLeave: onOut,
|
|
10
|
-
onPress: (event) => {
|
|
11
|
-
if (value.current === 'on') {
|
|
12
|
-
value.current = 'off';
|
|
13
|
-
onOut?.(event);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
value.current = 'on';
|
|
17
|
-
onIn?.(event);
|
|
18
|
-
},
|
|
19
|
-
}), [onIn, onOut]);
|
|
20
|
-
};
|
|
21
|
-
exports.useOnHoverOrPress = useOnHoverOrPress;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export const useAction = ({ onClick, onPress, }) => {
|
|
3
|
-
return useMemo(() => ({
|
|
4
|
-
onAction: (event) => {
|
|
5
|
-
if (onPress) {
|
|
6
|
-
onPress(event);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (onClick) {
|
|
10
|
-
onClick(event);
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
}), [onClick, onPress]);
|
|
14
|
-
};
|