@fluentui-react-native/pressable 0.9.64 → 0.9.65
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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/package.json +2 -2
- package/lib/Pressable.d.ts +0 -7
- package/lib/Pressable.d.ts.map +0 -1
- package/lib/Pressable.js +0 -41
- package/lib/Pressable.js.map +0 -1
- package/lib/Pressable.props.d.ts +0 -36
- package/lib/Pressable.props.d.ts.map +0 -1
- package/lib/Pressable.props.js +0 -2
- package/lib/Pressable.props.js.map +0 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/pressable",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Sat, 18 Mar 2023 17:18:20 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/pressable_v0.9.65",
|
|
7
|
+
"version": "0.9.65",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/pressable",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.26",
|
|
14
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 14 Mar 2023 20:50:45 GMT",
|
|
6
21
|
"tag": "@fluentui-react-native/pressable_v0.9.64",
|
|
7
22
|
"version": "0.9.64",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/pressable
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.9.65
|
|
8
|
+
|
|
9
|
+
Sat, 18 Mar 2023 17:18:20 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.22.26
|
|
14
|
+
|
|
7
15
|
## 0.9.64
|
|
8
16
|
|
|
9
|
-
Tue, 14 Mar 2023 20:
|
|
17
|
+
Tue, 14 Mar 2023 20:50:45 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/pressable",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.65",
|
|
4
4
|
"description": "A cross-platform Pressable component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@fluentui-react-native/adapters": ">=0.10.2 <1.0.0",
|
|
26
|
-
"@fluentui-react-native/interactive-hooks": ">=0.22.
|
|
26
|
+
"@fluentui-react-native/interactive-hooks": ">=0.22.26 <1.0.0",
|
|
27
27
|
"@uifabricshared/foundation-composable": ">=0.11.3 <1.0.0",
|
|
28
28
|
"@uifabricshared/foundation-settings": ">=0.12.3 <1.0.0"
|
|
29
29
|
},
|
package/lib/Pressable.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { IPressableProps } from './Pressable.props';
|
|
3
|
-
export declare const Pressable: import("@uifabricshared/foundation-composable").IWithComposable<import("react").FunctionComponent<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>>, import("@uifabricshared/foundation-composable").IComposable<IPressableProps<import("@fluentui-react-native/adapters").IViewProps>, {
|
|
4
|
-
root: import("@fluentui-react-native/adapters").IViewProps;
|
|
5
|
-
}, object>>;
|
|
6
|
-
export default Pressable;
|
|
7
|
-
//# sourceMappingURL=Pressable.d.ts.map
|
package/lib/Pressable.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":";AAmBA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAEzE,eAAO,MAAM,SAAS;;WAYpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/lib/Pressable.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is primarily a fork of React Native's Touchable Mixin.
|
|
3
|
-
* It has been repurposed as it's own standalone control for win32,
|
|
4
|
-
* as it needs to support a richer set of functionality on the desktop.
|
|
5
|
-
* The touchable variants can be rewritten as wrappers around TouchableWin32
|
|
6
|
-
* by passing the correct set of props down and managing state correctly.
|
|
7
|
-
*
|
|
8
|
-
* React Native's Touchable.js file (https://github.com/facebook/react-native/blob/master/Libraries/Components/Touchable/Touchable.js)
|
|
9
|
-
* provides an overview over how touchables work and interact with the gesture responder system.
|
|
10
|
-
*/
|
|
11
|
-
'use strict';
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { View } from 'react-native';
|
|
24
|
-
import { useAsPressable } from '@fluentui-react-native/interactive-hooks';
|
|
25
|
-
import { composable } from '@uifabricshared/foundation-composable';
|
|
26
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
27
|
-
export var Pressable = composable({
|
|
28
|
-
slots: { root: View },
|
|
29
|
-
usePrepareProps: function (userProps, useStyling) {
|
|
30
|
-
var renderStyle = userProps.renderStyle, rest = __rest(userProps, ["renderStyle"]);
|
|
31
|
-
var _a = useAsPressable(rest), props = _a.props, state = _a.state;
|
|
32
|
-
var styleProps = useStyling(props);
|
|
33
|
-
renderStyle && (props.style = renderStyle(state));
|
|
34
|
-
return {
|
|
35
|
-
slotProps: mergeSettings(styleProps, { root: props }),
|
|
36
|
-
state: { state: state },
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
export default Pressable;
|
|
41
|
-
//# sourceMappingURL=Pressable.js.map
|
package/lib/Pressable.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,CAAC;;;;;;;;;;;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAIpE,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAiB;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACrB,eAAe,EAAE,UAAC,SAA0B,EAAE,UAAuC;QAC3E,IAAA,WAAW,GAAc,SAAS,YAAvB,EAAK,IAAI,UAAK,SAAS,EAApC,eAAwB,CAAF,CAAe;QACrC,IAAA,KAAmB,cAAc,CAAC,IAAI,CAAC,EAArC,KAAK,WAAA,EAAE,KAAK,WAAyB,CAAC;QAC9C,IAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,OAAO;YACL,SAAS,EAAE,aAAa,CAA8B,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAClF,KAAK,EAAE,EAAE,KAAK,OAAA,EAAE;SACjB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/lib/Pressable.props.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
import type { ViewStyle, StyleProp } from 'react-native';
|
|
3
|
-
import type { IViewProps } from '@fluentui-react-native/adapters';
|
|
4
|
-
import type { IWithPressableOptions, IPressableState } from '@fluentui-react-native/interactive-hooks';
|
|
5
|
-
export type IPressableProps<TBase extends object = IViewProps> = IWithPressableOptions<TBase> & {
|
|
6
|
-
children?: IRenderChild<IPressableState>;
|
|
7
|
-
renderStyle?: IRenderStyle<IPressableState, ViewStyle>;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Used by IRenderChild, it simply describes a function that takes
|
|
11
|
-
* some generic state type T and returns a ReactNode
|
|
12
|
-
*/
|
|
13
|
-
export type IChildAsFunction<T> = (state: T) => React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* An IRenderChild describes children as a function that take the current
|
|
16
|
-
* state of the parent component. It is up to the parent to invoke the function
|
|
17
|
-
* and make proper use of the more typical ReactNode object that is returned
|
|
18
|
-
* This is an especially helpful construct when children of a Touchable require
|
|
19
|
-
* knowledge of the interaction state of their parent to properly render themselves
|
|
20
|
-
* (e.g. foreground color of a text child)
|
|
21
|
-
*/
|
|
22
|
-
export type IRenderChild<T> = IChildAsFunction<T> | React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* An IRenderStyle describes style as a function that takes the current
|
|
25
|
-
* state of the parent component. It is up to the parent to invoke the function
|
|
26
|
-
* and make proper use of the more typical StyleProp<S> object that is returned
|
|
27
|
-
* This is convenient for when styles need to be calculated depending on interaction states.
|
|
28
|
-
*/
|
|
29
|
-
export type IRenderStyle<T, S> = (state: T) => StyleProp<S>;
|
|
30
|
-
export type IPressableType<TBase extends object = IViewProps> = {
|
|
31
|
-
props: IPressableProps<TBase>;
|
|
32
|
-
slotProps: {
|
|
33
|
-
root: TBase;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=Pressable.props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.props.d.ts","sourceRoot":"","sources":["../src/Pressable.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAGvG,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,MAAM,GAAG,UAAU,IAAI,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAC9F,QAAQ,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAQzC,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;AAG5D,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,MAAM,GAAG,UAAU,IAAI;IAC9D,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,SAAS,EAAE;QACT,IAAI,EAAE,KAAK,CAAC;KACb,CAAC;CACH,CAAC"}
|
package/lib/Pressable.props.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.props.js","sourceRoot":"","sources":["../src/Pressable.props.ts"],"names":[],"mappings":""}
|
package/lib/index.d.ts
DELETED
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/index.js
DELETED
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|