@fluentui-react-native/pressable 0.9.65 → 0.9.67

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 CHANGED
@@ -2,7 +2,43 @@
2
2
  "name": "@fluentui-react-native/pressable",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 18 Mar 2023 17:18:20 GMT",
5
+ "date": "Thu, 23 Mar 2023 20:47:39 GMT",
6
+ "tag": "@fluentui-react-native/pressable_v0.9.67",
7
+ "version": "0.9.67",
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.28",
14
+ "commit": "58c71da6843a333d3b6faca82a851916205a4fd0"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 21 Mar 2023 21:53:47 GMT",
21
+ "tag": "@fluentui-react-native/pressable_v0.9.66",
22
+ "version": "0.9.66",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "krsiler@microsoft.com",
27
+ "package": "@fluentui-react-native/pressable",
28
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6",
29
+ "comment": "Trigger manual bump (no changes)"
30
+ },
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui-react-native/pressable",
34
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.27",
35
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Sat, 18 Mar 2023 17:22:31 GMT",
6
42
  "tag": "@fluentui-react-native/pressable_v0.9.65",
7
43
  "version": "0.9.65",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @fluentui-react-native/pressable
2
2
 
3
- This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Mar 2023 20:47:39 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.9.67
8
+
9
+ Thu, 23 Mar 2023 20:47:39 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/interactive-hooks to v0.22.28
14
+
15
+ ## 0.9.66
16
+
17
+ Tue, 21 Mar 2023 21:53:47 GMT
18
+
19
+ ### Patches
20
+
21
+ - Trigger manual bump (no changes) (krsiler@microsoft.com)
22
+ - Bump @fluentui-react-native/interactive-hooks to v0.22.27
23
+
7
24
  ## 0.9.65
8
25
 
9
- Sat, 18 Mar 2023 17:18:20 GMT
26
+ Sat, 18 Mar 2023 17:22:31 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,41 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,36 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Pressable.props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.props.js","sourceRoot":"","sources":["../src/Pressable.props.ts"],"names":[],"mappings":""}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export type { IChildAsFunction, IPressableProps, IPressableType, IRenderChild, IRenderStyle } from './Pressable.props';
2
+ export { Pressable } from './Pressable';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1,2 @@
1
+ export { Pressable } from './Pressable';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/pressable",
3
- "version": "0.9.65",
3
+ "version": "0.9.67",
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 <1.0.0",
26
+ "@fluentui-react-native/interactive-hooks": ">=0.22.28 <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
  },